cancel static method

Future<bool> cancel(
  1. int id
)

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 r = await channel.invokeMethod<bool>('Alarm.cancel', <dynamic>[id]);
  return (r == null) ? false : r;
}