setup static method
Implementation
static void setup(NERtcAudioMixingEventSink? api,
{BinaryMessenger? binaryMessenger}) {
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.NERtcAudioMixingEventSink.onAudioMixingStateChanged',
codec,
binaryMessenger: binaryMessenger);
if (api == null) {
channel.setMessageHandler(null);
} else {
channel.setMessageHandler((Object? message) async {
assert(message != null,
'Argument for dev.flutter.pigeon.NERtcAudioMixingEventSink.onAudioMixingStateChanged was null.');
final List<Object?> args = (message as List<Object?>?)!;
final int? arg_reason = (args[0] as int?);
assert(arg_reason != null,
'Argument for dev.flutter.pigeon.NERtcAudioMixingEventSink.onAudioMixingStateChanged was null, expected non-null int.');
api.onAudioMixingStateChanged(arg_reason!);
return;
});
}
}
{
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.NERtcAudioMixingEventSink.onAudioMixingTimestampUpdate',
codec,
binaryMessenger: binaryMessenger);
if (api == null) {
channel.setMessageHandler(null);
} else {
channel.setMessageHandler((Object? message) async {
assert(message != null,
'Argument for dev.flutter.pigeon.NERtcAudioMixingEventSink.onAudioMixingTimestampUpdate was null.');
final List<Object?> args = (message as List<Object?>?)!;
final int? arg_timestampMs = (args[0] as int?);
assert(arg_timestampMs != null,
'Argument for dev.flutter.pigeon.NERtcAudioMixingEventSink.onAudioMixingTimestampUpdate was null, expected non-null int.');
api.onAudioMixingTimestampUpdate(arg_timestampMs!);
return;
});
}
}
}