2025-07-30 22:38:44 +07:00
|
|
|
part of 'checkout_bloc.dart';
|
|
|
|
|
|
|
|
|
|
@freezed
|
|
|
|
|
class CheckoutState with _$CheckoutState {
|
|
|
|
|
const factory CheckoutState.initial() = _Initial;
|
|
|
|
|
const factory CheckoutState.loading() = _Loading;
|
|
|
|
|
const factory CheckoutState.loaded(
|
2025-08-06 18:47:20 +07:00
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
Discount? discountModel,
|
|
|
|
|
int discount,
|
|
|
|
|
int discountAmount,
|
|
|
|
|
int tax,
|
|
|
|
|
int serviceCharge,
|
|
|
|
|
int totalQuantity,
|
|
|
|
|
int totalPrice,
|
|
|
|
|
String draftName,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
DeliveryModel? deliveryType,
|
|
|
|
|
) = _Loaded;
|
2025-07-30 22:38:44 +07:00
|
|
|
const factory CheckoutState.error(String message) = _Error;
|
|
|
|
|
|
|
|
|
|
//save draft order
|
|
|
|
|
const factory CheckoutState.savedDraftOrder(int orderId) = _SavedDraftOrder;
|
|
|
|
|
}
|