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

@@ -4,7 +4,7 @@ import 'package:eatvio_app/features/notifications/presentation/notifications_cub
import 'package:flutter_bloc/flutter_bloc.dart';
class NotificationsCubit extends Cubit<NotificationsState> {
final List<NotificationModel> _notifications = [];
final List<BaseNotificationModel> _notifications = [];
final WsManager wsManager;
NotificationsCubit({required this.wsManager}) : super(const NotificationsState.empty()) {

View File

@@ -10,7 +10,7 @@ abstract class NotificationsState with _$NotificationsState {
const factory NotificationsState.empty() = NotificationsStateEmpty;
const factory NotificationsState.loaded({
required List<NotificationModel> notifications,
required List<BaseNotificationModel> notifications,
required int notificationsCount,
}) = NotificationsStateLoaded;