23 lines
607 B
Dart
23 lines
607 B
Dart
import 'shop_status.dart';
|
|
|
|
class ShopBlocState {
|
|
final ShopLoadStatus loadStatus;
|
|
final ShopActionStatus actionStatus;
|
|
|
|
ShopBlocState({required this.loadStatus, required this.actionStatus});
|
|
|
|
factory ShopBlocState.initial() =>
|
|
ShopBlocState(loadStatus: ShopInitial(), actionStatus: ActionIdle());
|
|
|
|
bool get busy => actionStatus is ActionLoading;
|
|
|
|
ShopBlocState copyWith({
|
|
ShopLoadStatus? loadStatus,
|
|
ShopActionStatus? actionStatus,
|
|
}) =>
|
|
ShopBlocState(
|
|
loadStatus: loadStatus ?? this.loadStatus,
|
|
actionStatus: actionStatus ?? this.actionStatus,
|
|
);
|
|
}
|