sistemato assets, finito creazione company, inizio lavoro store
This commit is contained in:
30
lib/features/store/bloc/store_state.dart
Normal file
30
lib/features/store/bloc/store_state.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
part of 'store_bloc.dart';
|
||||
|
||||
enum StoreStatus { initial, loading, success, failure }
|
||||
|
||||
class StoreState extends Equatable {
|
||||
final StoreStatus status;
|
||||
final StoreModel? store;
|
||||
final String? errorMessage;
|
||||
|
||||
const StoreState({
|
||||
this.status = StoreStatus.initial,
|
||||
this.store,
|
||||
this.errorMessage,
|
||||
});
|
||||
|
||||
StoreState copyWith({
|
||||
StoreStatus? status,
|
||||
StoreModel? store,
|
||||
String? errorMessage,
|
||||
}) {
|
||||
return StoreState(
|
||||
status: status ?? this.status,
|
||||
store: store ?? this.store,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [status, store, errorMessage];
|
||||
}
|
||||
Reference in New Issue
Block a user