Files
eatvio_app/lib/features/notifications/presentation/notifications_cubit/notifications_state.dart
2025-05-28 00:30:05 +07:00

23 lines
761 B
Dart

import 'package:eatvio_app/features/notifications/models/notification_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'notifications_state.freezed.dart';
@freezed
abstract class NotificationsState with _$NotificationsState {
const factory NotificationsState() = _NotificationsState;
const factory NotificationsState.empty() = NotificationsStateEmpty;
const factory NotificationsState.loaded({
required List<BaseNotificationModel> notifications,
required int notificationsCount,
@Default(false) bool isLoading,
@Default(false) bool hasUnreadNotifications,
}) = NotificationsStateLoaded;
const factory NotificationsState.error({
required String errorMessage,
}) = NotificationsStateError;
}