enableContextMenu static method

Future<void> enableContextMenu()

Enable the browser's context menu.

By default, when the app starts, the browser's context menu is already enabled. Typically this method would be called after first calling disableContextMenu.

This is an asynchronous action. The context menu can be considered to be enabled at the time that the Future resolves. enabled won't reflect the change until that time.

See also:

Implementation

static Future<void> enableContextMenu() {
  assert(kIsWeb, 'This has no effect on platforms other than web.');
  return _instance._channel.invokeMethod<void>(
    'enableContextMenu',
  ).then((_) {
    _instance._enabled = true;
  });
}