setUp static method
void
setUp(
- SentianceSmartGeofencesListenerApi? api, {
- BinaryMessenger? binaryMessenger,
- String messageChannelSuffix = '',
Implementation
static void setUp(SentianceSmartGeofencesListenerApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) {
messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
{
final BasicMessageChannel<Object?> __pigeon_channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.sentiance_smart_geofences.SentianceSmartGeofencesListenerApi.onSmartGeofenceEvent$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.sentiance_smart_geofences.SentianceSmartGeofencesListenerApi.onSmartGeofenceEvent was null.');
final List<Object?> args = (message as List<Object?>?)!;
final SmartGeofenceEvent? arg_event = (args[0] as SmartGeofenceEvent?);
assert(arg_event != null,
'Argument for dev.flutter.pigeon.sentiance_smart_geofences.SentianceSmartGeofencesListenerApi.onSmartGeofenceEvent was null, expected non-null SmartGeofenceEvent.');
try {
api.onSmartGeofenceEvent(arg_event!);
return wrapResponse(empty: true);
} on PlatformException catch (e) {
return wrapResponse(error: e);
} catch (e) {
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
}
});
}
}
}