handleMethodCall method

Future handleMethodCall(
  1. MethodCall call
)

Handles method calls over the MethodChannel of this plugin. Note: Check the "federated" architecture for a new way of doing this: https://flutter.dev/go/federated-plugins

Implementation

Future<dynamic> handleMethodCall(MethodCall call) async {
  switch (call.method) {
    case "ensureInitialized":
      return Future.value(true);
    case "waitUntilReadyToShow":
      return Future.value(true);
    case "show":
      return show(call);
    case "hide":
      return hide(call);
    case "isVisible":
      return isVisible(call);
    case "isMaximized":
      return isMaximized(call);
    case "maximize":
      return maximize(call);
    case "unmaximize":
      return unmaximize(call);
    case "isFullScreen":
      return isFullScreen(call);
    case "setFullScreen":
      return setFullScreen(call);
    case "getBounds":
      return getBounds(call);
    case "setBounds":
      return setBounds(call);
    case "isAlwaysOnTop":
      return isAlwaysOnTop(call);
    case "setAlwaysOnTop":
      return setAlwaysOnTop(call);
    case "setSkipTaskbar":
      return Future.value(true);
    default:
      throw PlatformException(
        code: 'Unimplemented',
        details:
            'window_manager for web doesn\'t implement \'${call.method}\'',
      );
  }
}