getAll method

  1. @override
Future<List<AlarmModel>> getAll()
override

Retrieves all scheduled alarms.

Implementation

@override
Future<List<AlarmModel>> getAll() async {
  final items =
      await methodChannel.invokeMethod<List<dynamic>>('getAll') ??
      <dynamic>[];
  return items
      .whereType<Map<dynamic, dynamic>>()
      .map((item) => AlarmModel.fromMap(Map<String, dynamic>.from(item)))
      .toList(growable: false);
}