createTimer method
Future<void>
createTimer(
{ - required int id,
- required int intervalMicroseconds,
- required bool backgroundMode,
})
override
Implementation
@override
Future<void> createTimer({
required int id,
required int intervalMicroseconds,
required bool backgroundMode,
}) async {
if (_backgroundCallback != null && !_backgroundCallbacksRegistered) {
await _methodChannel.invokeMethod<void>('registerBackgroundCallback');
_backgroundCallbacksRegistered = true;
}
await _methodChannel.invokeMethod<void>('createTimer', <String, dynamic>{
'id': id,
'intervalMicroseconds': intervalMicroseconds,
'backgroundMode': backgroundMode,
});
}