hasAlarm static method

Future<bool> hasAlarm()

Whether at least one alarm is set.

Implementation

static Future<bool> hasAlarm() async {
  await _waitUntilInitialized();

  final keys = _prefs.getKeys();

  for (final key in keys) {
    if (key.startsWith(prefix)) return true;
  }

  return false;
}