feat: Implement group management with BLoC pattern; add GroupBloc, GroupRepository, and related models
NOT FUNCTIONNAL
This commit is contained in:
@@ -8,33 +8,38 @@ abstract class GroupState extends Equatable {
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
// État initial
|
||||
class GroupInitial extends GroupState {}
|
||||
|
||||
// Chargement
|
||||
class GroupLoading extends GroupState {}
|
||||
|
||||
class GroupLoaded extends GroupState {
|
||||
// Groupes chargés
|
||||
class GroupsLoaded extends GroupState {
|
||||
final List<Group> groups;
|
||||
|
||||
const GroupLoaded({required this.groups});
|
||||
const GroupsLoaded(this.groups);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [groups];
|
||||
}
|
||||
|
||||
// Succès d'une opération
|
||||
class GroupOperationSuccess extends GroupState {
|
||||
final String message;
|
||||
|
||||
const GroupOperationSuccess({required this.message});
|
||||
const GroupOperationSuccess(this.message);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
|
||||
// Erreur
|
||||
class GroupError extends GroupState {
|
||||
final String message;
|
||||
|
||||
const GroupError({required this.message});
|
||||
const GroupError(this.message);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user