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