getNotifications method

  1. @override
Future<List<DitoNotificationInfo>> getNotifications()
override

Implementation

@override
Future<List<DitoNotificationInfo>> getNotifications() async {
  try {
    final list = await methodChannel.invokeListMethod<Map<Object?, Object?>>('getNotifications');
    return (list ?? []).map(DitoNotificationInfo.fromMap).toList();
  } on PlatformException {
    rethrow;
  } catch (e) {
    throw mapNativeError(e);
  }
}