getNotificationsWithApi method
Implementation
Future<List<CPNotification>> getNotificationsWithApi(bool combineWithApi) async {
List<dynamic>? remoteNotificationList = await _channel.invokeMethod(
"CleverPush#getNotificationsWithApi",
{'combineWithApi': combineWithApi}
);
if (remoteNotificationList != null) {
List<CPNotification> cpNotifications = remoteNotificationList.map((notification) {
return CPNotification(notification.cast<String, dynamic>());
}).toList();
return cpNotifications;
} else {
return [];
}
}