feat: refactor code
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import '../../domain/entities/shop_entities.dart';
|
||||
|
||||
abstract class ShopLoadStatus {}
|
||||
|
||||
class ShopInitial extends ShopLoadStatus {}
|
||||
|
||||
class ShopLoading extends ShopLoadStatus {}
|
||||
|
||||
class ShopLoaded extends ShopLoadStatus {
|
||||
final ShopData data;
|
||||
ShopLoaded(this.data);
|
||||
}
|
||||
|
||||
class ShopLoadError extends ShopLoadStatus {
|
||||
final String message;
|
||||
ShopLoadError(this.message);
|
||||
}
|
||||
|
||||
/// وضعیتِ یک عملیات (خرید/انتخاب/تبلیغ).
|
||||
abstract class ShopActionStatus {}
|
||||
|
||||
class ActionIdle extends ShopActionStatus {}
|
||||
|
||||
class ActionLoading extends ShopActionStatus {}
|
||||
|
||||
class ActionSuccess extends ShopActionStatus {
|
||||
final String message;
|
||||
ActionSuccess(this.message);
|
||||
}
|
||||
|
||||
class ActionError extends ShopActionStatus {
|
||||
final String message;
|
||||
ActionError(this.message);
|
||||
}
|
||||
Reference in New Issue
Block a user