feat: Add numerous repository implementations, cubits, and core utilities across various features, and update dependencies.

This commit is contained in:
mso7nueh
2026-02-02 14:24:17 +03:00
parent ac5504a514
commit 278f4d7e10
45 changed files with 602 additions and 292 deletions

View File

@@ -1,15 +1,17 @@
import 'dart:developer';
import 'package:eatvio_app/features/notifications/service/notifications_service.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
class NotificationsRepository {
final NotificationsService notificationsService;
NotificationsRepository({required this.notificationsService});
Future<Map<String, dynamic>?> getNotifications({required int page}) {
Future<Map<String, dynamic>?> getNotifications({required int page}) async {
try {
return notificationsService.getNotifications(page: page);
} catch (e) {
return await notificationsService.getNotifications(page: page);
} catch (e, s) {
log(e.toString());
await Sentry.captureException(e, stackTrace: s);
rethrow;
}
}
@@ -17,7 +19,8 @@ class NotificationsRepository {
Future<void> markNotificationsAsRead() async {
try {
await notificationsService.markNotificationsAsRead();
} catch (e) {
} catch (e, s) {
await Sentry.captureException(e, stackTrace: s);
rethrow;
}
}