cancel static method
Cancels a timer.
If a timer has been scheduled with id
, then this function will cancel
it.
Returns a Future that resolves to true
on success and false
on
failure.
Implementation
static Future<bool> cancel(int id) async {
final bool? r =
await _channel.invokeMethod<bool>('Alarm.cancel', <dynamic>[id]);
return r ?? false;
}