getInAppNotifications method
Implementation
Future<PaginatedResponse<Notification>> getInAppNotifications(String subscriberId, {int? page, int? limit, bool? read, bool? seen}) async {
Map<String, dynamic> response = await request(method: ApiMethod.GET, endpoint: 'subscribers/$subscriberId/notifications/feed', query: {
if (page != null) 'page': page,
if (limit != null) 'limit': limit,
if (read != null) 'read': read,
if (seen != null) 'seen': seen,
});
return PaginatedResponse<Notification>(
page: response['page'],
totalCount: response['totalCount'],
pageSize: response['pageSize'],
hasMore: response['hasMore'],
data: response['data'].map<Notification>((var r) => Notification.fromJson(r)).toList(),
);
}