configure method
Future<bool>
configure({
- required IosConfiguration iosConfiguration,
- required AndroidConfiguration androidConfiguration,
override
Implementation
Future<bool> configure({
required IosConfiguration iosConfiguration,
required AndroidConfiguration androidConfiguration,
}) async {
_channel.setMethodCallHandler(_handle);
final CallbackHandle? foregroundHandle =
iosConfiguration.onForeground == null
? null
: PluginUtilities.getCallbackHandle(iosConfiguration.onForeground!);
final CallbackHandle? backgroundHandle =
iosConfiguration.onBackground == null
? null
: PluginUtilities.getCallbackHandle(iosConfiguration.onBackground!);
final result = await _channel.invokeMethod(
"configure",
{
"background_handle": backgroundHandle?.toRawHandle(),
"foreground_handle": foregroundHandle?.toRawHandle(),
"auto_start": iosConfiguration.autoStart,
},
);
return result ?? false;
}