created notifications model and logic of type based parsing

This commit is contained in:
Username1548
2025-05-20 22:21:10 +07:00
parent aeedc35c42
commit c1e2b1c312
7 changed files with 350 additions and 23 deletions

View File

@@ -0,0 +1,15 @@
import 'package:eatvio_app/features/notifications/models/notification_model.dart';
import 'package:eatvio_app/features/notifications/service/notifications_service.dart';
class NotificationsRepository {
final NotificationsService notificationsService;
NotificationsRepository({required this.notificationsService});
Future<List<BaseNotificationModel>?> getNotifications({required int page}) {
try {
return notificationsService.getNotifications(page: page);
} catch (e) {
rethrow;
}
}
}