initialize static method
Starts the AndroidAlarmManager service. This must be called before setting any alarms.
Returns a Future that resolves to true
on success and false
on
failure.
Implementation
static Future<bool> initialize() async {
final CallbackHandle? handle =
_getCallbackHandle(_alarmManagerCallbackDispatcher);
if (handle == null) {
return false;
}
final bool? r = await _channel.invokeMethod<bool>(
'AlarmService.start', <dynamic>[handle.toRawHandle()]);
return r ?? false;
}