Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
42
lib/features/adhesions/bloc/adhesions_state.dart
Normal file
42
lib/features/adhesions/bloc/adhesions_state.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
part of 'adhesions_bloc.dart';
|
||||
|
||||
enum AdhesionsStatus { initial, loading, loaded, error }
|
||||
|
||||
class AdhesionsState extends Equatable {
|
||||
final AdhesionsStatus status;
|
||||
final List<AdhesionModel> adhesions;
|
||||
final AdhesionModel? adhesionDetail;
|
||||
final Map<String, dynamic>? stats;
|
||||
final String? message;
|
||||
final Object? error;
|
||||
|
||||
const AdhesionsState({
|
||||
this.status = AdhesionsStatus.initial,
|
||||
this.adhesions = const [],
|
||||
this.adhesionDetail,
|
||||
this.stats,
|
||||
this.message,
|
||||
this.error,
|
||||
});
|
||||
|
||||
AdhesionsState copyWith({
|
||||
AdhesionsStatus? status,
|
||||
List<AdhesionModel>? adhesions,
|
||||
AdhesionModel? adhesionDetail,
|
||||
Map<String, dynamic>? stats,
|
||||
String? message,
|
||||
Object? error,
|
||||
}) {
|
||||
return AdhesionsState(
|
||||
status: status ?? this.status,
|
||||
adhesions: adhesions ?? this.adhesions,
|
||||
adhesionDetail: adhesionDetail ?? this.adhesionDetail,
|
||||
stats: stats ?? this.stats,
|
||||
message: message ?? this.message,
|
||||
error: error ?? this.error,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [status, adhesions, adhesionDetail, stats, message, error];
|
||||
}
|
||||
Reference in New Issue
Block a user