Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class NotificationItem extends Equatable {
|
||||
final String id;
|
||||
final String title;
|
||||
final String body;
|
||||
final DateTime date;
|
||||
final bool isRead;
|
||||
final String category; // 'finance', 'event', 'system'
|
||||
|
||||
const NotificationItem({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.body,
|
||||
required this.date,
|
||||
this.isRead = false,
|
||||
required this.category,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, title, body, date, isRead, category];
|
||||
}
|
||||
|
||||
abstract class NotificationState extends Equatable {
|
||||
const NotificationState();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class NotificationInitial extends NotificationState {}
|
||||
|
||||
class NotificationLoading extends NotificationState {}
|
||||
|
||||
class NotificationLoaded extends NotificationState {
|
||||
final List<NotificationItem> items;
|
||||
|
||||
const NotificationLoaded({required this.items});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [items];
|
||||
}
|
||||
|
||||
class NotificationError extends NotificationState {
|
||||
final String message;
|
||||
const NotificationError(this.message);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
Reference in New Issue
Block a user