Added unread list api in notification

This commit is contained in:
llsajjad
2025-09-23 15:49:30 +03:30
parent 70066c26e8
commit 1f60954c53
5 changed files with 86 additions and 22 deletions
@@ -4,7 +4,7 @@ import 'package:tm_app/data/services/notification_service.dart';
class NotificationsRepository {
NotificationsRepository({required NotificationsService notificationsService})
: _notificationsService = notificationsService;
: _notificationsService = notificationsService;
final NotificationsService _notificationsService;
@@ -12,14 +12,20 @@ class NotificationsRepository {
required int limit,
required int offset,
}) async {
return _notificationsService.getNotifications(
return _notificationsService.getNotifications(limit: limit, offset: offset);
}
Future<Result<Map<String, dynamic>>> markAllAsRead() async {
return _notificationsService.markAllAsRead();
}
Future<Result<NotificationResponseModel>> getUnreadNotifications({
required int limit,
required int offset,
}) {
return _notificationsService.getUnreadNotifications(
limit: limit,
offset: offset,
);
}
Future<Result<Map<String, dynamic>>> markAllAsRead() async {
return _notificationsService.markAllAsRead();
}
}