Files
flux/lib/features/staff/blocs/staff_state.dart

34 lines
829 B
Dart
Raw Normal View History

2026-04-13 15:18:37 +02:00
part of 'staff_cubit.dart';
class StaffState extends Equatable {
final List<StaffMemberModel> allStaff;
final Map<String, List<StaffMemberModel>>
staffByStore; // storeId -> List of staff
final bool isLoading;
final String? error;
const StaffState({
this.allStaff = const [],
this.staffByStore = const {},
this.isLoading = false,
this.error,
});
StaffState copyWith({
List<StaffMemberModel>? allStaff,
Map<String, List<StaffMemberModel>>? staffByStore,
bool? isLoading,
String? error,
}) {
return StaffState(
allStaff: allStaff ?? this.allStaff,
staffByStore: staffByStore ?? this.staffByStore,
isLoading: isLoading ?? this.isLoading,
error: error,
);
}
@override
List<Object?> get props => [allStaff, staffByStore, isLoading, error];
}