This commit is contained in:
2026-04-13 19:27:23 +02:00
parent f710183f61
commit f33b63c0c6
3 changed files with 36 additions and 15 deletions

View File

@@ -7,12 +7,14 @@ class StoreState extends Equatable {
final StoreModel? store;
final String? errorMessage;
final List<StoreModel> stores;
final Map<StoreModel, List<StaffMemberModel>> staffByStore;
const StoreState({
this.status = StoreStatus.initial,
this.store,
this.errorMessage,
required this.stores,
required this.staffByStore,
});
StoreState copyWith({
@@ -20,15 +22,23 @@ class StoreState extends Equatable {
StoreModel? store,
String? errorMessage,
List<StoreModel>? stores,
Map<StoreModel, List<StaffMemberModel>>? staffByStore,
}) {
return StoreState(
status: status ?? this.status,
store: store ?? this.store,
errorMessage: errorMessage ?? this.errorMessage,
stores: stores ?? this.stores,
staffByStore: staffByStore ?? this.staffByStore,
);
}
@override
List<Object?> get props => [status, store, errorMessage, stores];
List<Object?> get props => [
status,
store,
errorMessage,
stores,
staffByStore,
];
}