setUp static method

void setUp(
  1. RuStoreRemoteConfigCallback? api, {
  2. BinaryMessenger? binaryMessenger,
  3. String messageChannelSuffix = '',
})

Implementation

static void setUp(RuStoreRemoteConfigCallback? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) {
  messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
  {
    final BasicMessageChannel<Object?> __pigeon_channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.backgroundJobErrors$messageChannelSuffix', pigeonChannelCodec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      __pigeon_channel.setMessageHandler(null);
    } else {
      __pigeon_channel.setMessageHandler((Object? message) async {
        assert(message != null,
        'Argument for dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.backgroundJobErrors was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final String? arg_error = (args[0] as String?);
        assert(arg_error != null,
            'Argument for dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.backgroundJobErrors was null, expected non-null String.');
        try {
          await api.backgroundJobErrors(arg_error!);
          return wrapResponse(empty: true);
        } on PlatformException catch (e) {
          return wrapResponse(error: e);
        }          catch (e) {
          return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
        }
      });
    }
  }
  {
    final BasicMessageChannel<Object?> __pigeon_channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.firstLoadComplete$messageChannelSuffix', pigeonChannelCodec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      __pigeon_channel.setMessageHandler(null);
    } else {
      __pigeon_channel.setMessageHandler((Object? message) async {
        try {
          await api.firstLoadComplete();
          return wrapResponse(empty: true);
        } on PlatformException catch (e) {
          return wrapResponse(error: e);
        }          catch (e) {
          return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
        }
      });
    }
  }
  {
    final BasicMessageChannel<Object?> __pigeon_channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.onInitCompleted$messageChannelSuffix', pigeonChannelCodec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      __pigeon_channel.setMessageHandler(null);
    } else {
      __pigeon_channel.setMessageHandler((Object? message) async {
        try {
          await api.onInitCompleted();
          return wrapResponse(empty: true);
        } on PlatformException catch (e) {
          return wrapResponse(error: e);
        }          catch (e) {
          return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
        }
      });
    }
  }
  {
    final BasicMessageChannel<Object?> __pigeon_channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.memoryCacheUpdated$messageChannelSuffix', pigeonChannelCodec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      __pigeon_channel.setMessageHandler(null);
    } else {
      __pigeon_channel.setMessageHandler((Object? message) async {
        try {
          await api.memoryCacheUpdated();
          return wrapResponse(empty: true);
        } on PlatformException catch (e) {
          return wrapResponse(error: e);
        }          catch (e) {
          return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
        }
      });
    }
  }
  {
    final BasicMessageChannel<Object?> __pigeon_channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.persistentStorageUpdated$messageChannelSuffix', pigeonChannelCodec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      __pigeon_channel.setMessageHandler(null);
    } else {
      __pigeon_channel.setMessageHandler((Object? message) async {
        try {
          await api.persistentStorageUpdated();
          return wrapResponse(empty: true);
        } on PlatformException catch (e) {
          return wrapResponse(error: e);
        }          catch (e) {
          return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
        }
      });
    }
  }
  {
    final BasicMessageChannel<Object?> __pigeon_channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.remoteConfigNetworkRequestFailure$messageChannelSuffix', pigeonChannelCodec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      __pigeon_channel.setMessageHandler(null);
    } else {
      __pigeon_channel.setMessageHandler((Object? message) async {
        assert(message != null,
        'Argument for dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.remoteConfigNetworkRequestFailure was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final String? arg_error = (args[0] as String?);
        assert(arg_error != null,
            'Argument for dev.flutter.pigeon.flutter_rustore_remoteconfig.RuStoreRemoteConfigCallback.remoteConfigNetworkRequestFailure was null, expected non-null String.');
        try {
          await api.remoteConfigNetworkRequestFailure(arg_error!);
          return wrapResponse(empty: true);
        } on PlatformException catch (e) {
          return wrapResponse(error: e);
        }          catch (e) {
          return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
        }
      });
    }
  }
}