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