Refactor user and theme management to use BLoC pattern; remove provider classes and integrate new services for user and group functionalities
This commit is contained in:
40
lib/blocs/group/group_state.dart
Normal file
40
lib/blocs/group/group_state.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import '../../data/models/group.dart';
|
||||
|
||||
abstract class GroupState extends Equatable {
|
||||
const GroupState();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class GroupInitial extends GroupState {}
|
||||
|
||||
class GroupLoading extends GroupState {}
|
||||
|
||||
class GroupLoaded extends GroupState {
|
||||
final List<Group> groups;
|
||||
|
||||
const GroupLoaded({required this.groups});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [groups];
|
||||
}
|
||||
|
||||
class GroupOperationSuccess extends GroupState {
|
||||
final String message;
|
||||
|
||||
const GroupOperationSuccess({required this.message});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
|
||||
class GroupError extends GroupState {
|
||||
final String message;
|
||||
|
||||
const GroupError({required this.message});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
Reference in New Issue
Block a user