setup static method

void setup(
  1. NativeCallFlutterApi? api, {
  2. BinaryMessenger? binaryMessenger,
})

Implementation

static void setup(NativeCallFlutterApi? api,
    {BinaryMessenger? binaryMessenger}) {
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fHandleRegisteredUrl',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fHandleRegisteredUrl was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final String? arg_url = (args[0] as String?);
        assert(arg_url != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fHandleRegisteredUrl was null, expected non-null String.');
        api.n2fHandleRegisteredUrl(arg_url!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fOpenPinCreation', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fOpenPinCreation();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fClosePinCreation', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fClosePinCreation();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fPinNotAllowed', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fPinNotAllowed was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final OWOneginiError? arg_error = (args[0] as OWOneginiError?);
        assert(arg_error != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fPinNotAllowed was null, expected non-null OWOneginiError.');
        api.n2fPinNotAllowed(arg_error!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fOpenPinAuthentication',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fOpenPinAuthentication();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fClosePinAuthentication',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fClosePinAuthentication();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fNextPinAuthenticationAttempt',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fNextPinAuthenticationAttempt was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final OWAuthenticationAttempt? arg_authenticationAttempt =
            (args[0] as OWAuthenticationAttempt?);
        assert(arg_authenticationAttempt != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fNextPinAuthenticationAttempt was null, expected non-null OWAuthenticationAttempt.');
        api.n2fNextPinAuthenticationAttempt(arg_authenticationAttempt!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fOpenAuthOtp', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fOpenAuthOtp was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final String? arg_message = (args[0] as String?);
        api.n2fOpenAuthOtp(arg_message);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fCloseAuthOtp', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fCloseAuthOtp();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fOpenFingerprintScreen',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fOpenFingerprintScreen();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fCloseFingerprintScreen',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fCloseFingerprintScreen();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fShowScanningFingerprint',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fShowScanningFingerprint();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fNextFingerprintAuthenticationAttempt',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        // ignore message
        api.n2fNextFingerprintAuthenticationAttempt();
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fEventInitCustomRegistration',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fEventInitCustomRegistration was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final OWCustomInfo? arg_customInfo = (args[0] as OWCustomInfo?);
        final String? arg_providerId = (args[1] as String?);
        assert(arg_providerId != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fEventInitCustomRegistration was null, expected non-null String.');
        api.n2fEventInitCustomRegistration(arg_customInfo, arg_providerId!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NativeCallFlutterApi.n2fEventFinishCustomRegistration',
        codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fEventFinishCustomRegistration was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final OWCustomInfo? arg_customInfo = (args[0] as OWCustomInfo?);
        final String? arg_providerId = (args[1] as String?);
        assert(arg_providerId != null,
            'Argument for dev.flutter.pigeon.NativeCallFlutterApi.n2fEventFinishCustomRegistration was null, expected non-null String.');
        api.n2fEventFinishCustomRegistration(arg_customInfo, arg_providerId!);
        return;
      });
    }
  }
}