setup static method

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

Implementation

static void setup(NERtcStatsEventSink? api,
    {BinaryMessenger? binaryMessenger}) {
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NERtcStatsEventSink.onRtcStats', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onRtcStats was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final Map<Object?, Object?>? arg_arguments =
            (args[0] as Map<Object?, Object?>?)?.cast<Object?, Object?>();
        assert(arg_arguments != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onRtcStats was null, expected non-null Map<Object?, Object?>.');
        api.onRtcStats(arg_arguments!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NERtcStatsEventSink.onLocalAudioStats', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onLocalAudioStats was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final Map<Object?, Object?>? arg_arguments =
            (args[0] as Map<Object?, Object?>?)?.cast<Object?, Object?>();
        assert(arg_arguments != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onLocalAudioStats was null, expected non-null Map<Object?, Object?>.');
        api.onLocalAudioStats(arg_arguments!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NERtcStatsEventSink.onRemoteAudioStats', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onRemoteAudioStats was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final Map<Object?, Object?>? arg_arguments =
            (args[0] as Map<Object?, Object?>?)?.cast<Object?, Object?>();
        assert(arg_arguments != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onRemoteAudioStats was null, expected non-null Map<Object?, Object?>.');
        api.onRemoteAudioStats(arg_arguments!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NERtcStatsEventSink.onLocalVideoStats', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onLocalVideoStats was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final Map<Object?, Object?>? arg_arguments =
            (args[0] as Map<Object?, Object?>?)?.cast<Object?, Object?>();
        assert(arg_arguments != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onLocalVideoStats was null, expected non-null Map<Object?, Object?>.');
        api.onLocalVideoStats(arg_arguments!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NERtcStatsEventSink.onRemoteVideoStats', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onRemoteVideoStats was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final Map<Object?, Object?>? arg_arguments =
            (args[0] as Map<Object?, Object?>?)?.cast<Object?, Object?>();
        assert(arg_arguments != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onRemoteVideoStats was null, expected non-null Map<Object?, Object?>.');
        api.onRemoteVideoStats(arg_arguments!);
        return;
      });
    }
  }
  {
    final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
        'dev.flutter.pigeon.NERtcStatsEventSink.onNetworkQuality', codec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      channel.setMessageHandler(null);
    } else {
      channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onNetworkQuality was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final Map<Object?, Object?>? arg_arguments =
            (args[0] as Map<Object?, Object?>?)?.cast<Object?, Object?>();
        assert(arg_arguments != null,
            'Argument for dev.flutter.pigeon.NERtcStatsEventSink.onNetworkQuality was null, expected non-null Map<Object?, Object?>.');
        api.onNetworkQuality(arg_arguments!);
        return;
      });
    }
  }
}