getDeviceAlerts method

  1. @override
Future<List<Map<String, dynamic>>> getDeviceAlerts({
  1. required String deviceId,
  2. required int year,
  3. required int month,
})
override

Get alerts of a given device deviceId, year, month details are passed to native getDeviceAlerts function of native is invoked

Implementation

@override
Future<List<Map<String, dynamic>>> getDeviceAlerts({
  required String deviceId,
  required int year,
  required int month,
}) async {
  final List<dynamic> result = await _channel.invokeMethod(
    'getDeviceAlerts',
    {'deviceId': deviceId, 'year': year, 'month': month},
  );
  return result.cast<Map>().map((e) => Map<String, dynamic>.from(e)).toList();
}