Files
eatvio_app/lib/features/notifications/repository/notifications_repository.dart
2025-08-06 11:28:02 +03:00

25 lines
641 B
Dart

import 'dart:developer';
import 'package:eatvio_app/features/notifications/service/notifications_service.dart';
class NotificationsRepository {
final NotificationsService notificationsService;
NotificationsRepository({required this.notificationsService});
Future<Map<String, dynamic>?> getNotifications({required int page}) {
try {
return notificationsService.getNotifications(page: page);
} catch (e) {
log(e.toString());
rethrow;
}
}
Future<void> markNotificationsAsRead() async {
try {
await notificationsService.markNotificationsAsRead();
} catch (e) {
rethrow;
}
}
}