handleMethod method

Future handleMethod(
  1. MethodCall call
)

Implementation

Future<dynamic> handleMethod(MethodCall call) async {
  switch (call.method) {
    case "onChromeSafariBrowserOpened":
      onOpened();
      break;
    case "onChromeSafariBrowserCompletedInitialLoad":
      onCompletedInitialLoad();
      break;
    case "onChromeSafariBrowserClosed":
      onClosed();
      this._isOpened = false;
      break;
    case "onChromeSafariBrowserItemActionPerform":
      String url = call.arguments["url"];
      String title = call.arguments["title"];
      int id = call.arguments["id"].toInt();
      if (this._actionButton?.id == id) {
        this._actionButton?.action(url, title);
      } else if (this._menuItems[id] != null) {
        this._menuItems[id]?.action(url, title);
      }
      break;
    default:
      throw UnimplementedError("Unimplemented ${call.method} method");
  }
}