2025-07-30 22:38:44 +07:00
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of ' checkout_bloc.dart ' ;
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _ $identity < T > ( T value ) = > value ;
final _privateConstructorUsedError = UnsupportedError (
' It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it. \n Please check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models ' ) ;
/// @nodoc
mixin _ $CheckoutEvent {
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $CheckoutEventCopyWith < $Res > {
factory $CheckoutEventCopyWith (
CheckoutEvent value , $Res Function ( CheckoutEvent ) then ) =
_ $CheckoutEventCopyWithImpl < $Res , CheckoutEvent > ;
}
/// @nodoc
class _ $CheckoutEventCopyWithImpl < $Res , $Val extends CheckoutEvent >
implements $CheckoutEventCopyWith < $Res > {
_ $CheckoutEventCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
abstract class _ $ $StartedImplCopyWith < $Res > {
factory _ $ $StartedImplCopyWith (
_ $StartedImpl value , $Res Function ( _ $StartedImpl ) then ) =
__ $ $StartedImplCopyWithImpl < $Res > ;
2025-09-01 22:12:56 +07:00
@ useResult
$Res call ( { List < ProductQuantity > items } ) ;
2025-07-30 22:38:44 +07:00
}
/// @nodoc
class __ $ $StartedImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $StartedImpl >
implements _ $ $StartedImplCopyWith < $Res > {
__ $ $StartedImplCopyWithImpl (
_ $StartedImpl _value , $Res Function ( _ $StartedImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
2025-09-01 22:12:56 +07:00
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? items = null ,
} ) {
return _then ( _ $StartedImpl (
null = = items
? _value . _items
: items // ignore: cast_nullable_to_non_nullable
as List < ProductQuantity > ,
) ) ;
}
2025-07-30 22:38:44 +07:00
}
/// @nodoc
class _ $StartedImpl implements _Started {
2025-09-01 22:12:56 +07:00
const _ $StartedImpl ( final List < ProductQuantity > items ) : _items = items ;
final List < ProductQuantity > _items ;
@ override
List < ProductQuantity > get items {
if ( _items is EqualUnmodifiableListView ) return _items ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _items ) ;
}
2025-07-30 22:38:44 +07:00
@ override
String toString ( ) {
2025-09-01 22:12:56 +07:00
return ' CheckoutEvent.started(items: $ items ) ' ;
2025-07-30 22:38:44 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
2025-09-01 22:12:56 +07:00
( other . runtimeType = = runtimeType & &
other is _ $StartedImpl & &
const DeepCollectionEquality ( ) . equals ( other . _items , _items ) ) ;
2025-07-30 22:38:44 +07:00
}
@ override
2025-09-01 22:12:56 +07:00
int get hashCode = >
Object . hash ( runtimeType , const DeepCollectionEquality ( ) . hash ( _items ) ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $StartedImplCopyWith < _ $StartedImpl > get copyWith = >
__ $ $StartedImplCopyWithImpl < _ $StartedImpl > ( this , _ $identity ) ;
2025-07-30 22:38:44 +07:00
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
2025-09-01 22:12:56 +07:00
return started ( items ) ;
2025-07-30 22:38:44 +07:00
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
2025-09-01 22:12:56 +07:00
return started ? . call ( items ) ;
2025-07-30 22:38:44 +07:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( started ! = null ) {
2025-09-01 22:12:56 +07:00
return started ( items ) ;
2025-07-30 22:38:44 +07:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return started ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return started ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( started ! = null ) {
return started ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _Started implements CheckoutEvent {
2025-09-01 22:12:56 +07:00
const factory _Started ( final List < ProductQuantity > items ) = _ $StartedImpl ;
List < ProductQuantity > get items ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $StartedImplCopyWith < _ $StartedImpl > get copyWith = >
throw _privateConstructorUsedError ;
2025-07-30 22:38:44 +07:00
}
/// @nodoc
abstract class _ $ $AddItemImplCopyWith < $Res > {
factory _ $ $AddItemImplCopyWith (
_ $AddItemImpl value , $Res Function ( _ $AddItemImpl ) then ) =
__ $ $AddItemImplCopyWithImpl < $Res > ;
@ useResult
2025-08-04 17:42:39 +07:00
$Res call ( { Product product , ProductVariant ? variant } ) ;
2025-07-30 22:38:44 +07:00
}
/// @nodoc
class __ $ $AddItemImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $AddItemImpl >
implements _ $ $AddItemImplCopyWith < $Res > {
__ $ $AddItemImplCopyWithImpl (
_ $AddItemImpl _value , $Res Function ( _ $AddItemImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? product = null ,
2025-08-04 17:42:39 +07:00
Object ? variant = freezed ,
2025-07-30 22:38:44 +07:00
} ) {
return _then ( _ $AddItemImpl (
null = = product
? _value . product
: product // ignore: cast_nullable_to_non_nullable
as Product ,
2025-08-04 17:42:39 +07:00
freezed = = variant
? _value . variant
: variant // ignore: cast_nullable_to_non_nullable
as ProductVariant ? ,
2025-07-30 22:38:44 +07:00
) ) ;
}
}
/// @nodoc
class _ $AddItemImpl implements _AddItem {
2025-08-04 17:42:39 +07:00
const _ $AddItemImpl ( this . product , this . variant ) ;
2025-07-30 22:38:44 +07:00
@ override
final Product product ;
2025-08-04 17:42:39 +07:00
@ override
final ProductVariant ? variant ;
2025-07-30 22:38:44 +07:00
@ override
String toString ( ) {
2025-08-04 17:42:39 +07:00
return ' CheckoutEvent.addItem(product: $ product , variant: $ variant ) ' ;
2025-07-30 22:38:44 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $AddItemImpl & &
2025-08-04 17:42:39 +07:00
( identical ( other . product , product ) | | other . product = = product ) & &
( identical ( other . variant , variant ) | | other . variant = = variant ) ) ;
2025-07-30 22:38:44 +07:00
}
@ override
2025-08-04 17:42:39 +07:00
int get hashCode = > Object . hash ( runtimeType , product , variant ) ;
2025-07-30 22:38:44 +07:00
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $AddItemImplCopyWith < _ $AddItemImpl > get copyWith = >
__ $ $AddItemImplCopyWithImpl < _ $AddItemImpl > ( this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
2025-08-04 17:42:39 +07:00
return addItem ( product , variant ) ;
2025-07-30 22:38:44 +07:00
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
2025-08-04 17:42:39 +07:00
return addItem ? . call ( product , variant ) ;
2025-07-30 22:38:44 +07:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( addItem ! = null ) {
2025-08-04 17:42:39 +07:00
return addItem ( product , variant ) ;
2025-07-30 22:38:44 +07:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addItem ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addItem ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( addItem ! = null ) {
return addItem ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _AddItem implements CheckoutEvent {
2025-08-04 17:42:39 +07:00
const factory _AddItem ( final Product product , final ProductVariant ? variant ) =
_ $AddItemImpl ;
2025-07-30 22:38:44 +07:00
Product get product ;
2025-08-04 17:42:39 +07:00
ProductVariant ? get variant ;
2025-07-30 22:38:44 +07:00
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $AddItemImplCopyWith < _ $AddItemImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $RemoveItemImplCopyWith < $Res > {
factory _ $ $RemoveItemImplCopyWith (
_ $RemoveItemImpl value , $Res Function ( _ $RemoveItemImpl ) then ) =
__ $ $RemoveItemImplCopyWithImpl < $Res > ;
@ useResult
2025-08-04 17:42:39 +07:00
$Res call ( { Product product , ProductVariant ? variant } ) ;
2025-07-30 22:38:44 +07:00
}
/// @nodoc
class __ $ $RemoveItemImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $RemoveItemImpl >
implements _ $ $RemoveItemImplCopyWith < $Res > {
__ $ $RemoveItemImplCopyWithImpl (
_ $RemoveItemImpl _value , $Res Function ( _ $RemoveItemImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? product = null ,
2025-08-04 17:42:39 +07:00
Object ? variant = freezed ,
2025-07-30 22:38:44 +07:00
} ) {
return _then ( _ $RemoveItemImpl (
null = = product
? _value . product
: product // ignore: cast_nullable_to_non_nullable
as Product ,
2025-08-04 17:42:39 +07:00
freezed = = variant
? _value . variant
: variant // ignore: cast_nullable_to_non_nullable
as ProductVariant ? ,
2025-07-30 22:38:44 +07:00
) ) ;
}
}
/// @nodoc
class _ $RemoveItemImpl implements _RemoveItem {
2025-08-04 17:42:39 +07:00
const _ $RemoveItemImpl ( this . product , this . variant ) ;
2025-07-30 22:38:44 +07:00
@ override
final Product product ;
2025-08-04 17:42:39 +07:00
@ override
final ProductVariant ? variant ;
2025-07-30 22:38:44 +07:00
@ override
String toString ( ) {
2025-08-04 17:42:39 +07:00
return ' CheckoutEvent.removeItem(product: $ product , variant: $ variant ) ' ;
2025-07-30 22:38:44 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $RemoveItemImpl & &
2025-08-04 17:42:39 +07:00
( identical ( other . product , product ) | | other . product = = product ) & &
( identical ( other . variant , variant ) | | other . variant = = variant ) ) ;
2025-07-30 22:38:44 +07:00
}
@ override
2025-08-04 17:42:39 +07:00
int get hashCode = > Object . hash ( runtimeType , product , variant ) ;
2025-07-30 22:38:44 +07:00
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $RemoveItemImplCopyWith < _ $RemoveItemImpl > get copyWith = >
__ $ $RemoveItemImplCopyWithImpl < _ $RemoveItemImpl > ( this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
2025-08-04 17:42:39 +07:00
return removeItem ( product , variant ) ;
2025-07-30 22:38:44 +07:00
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
2025-08-04 17:42:39 +07:00
return removeItem ? . call ( product , variant ) ;
2025-07-30 22:38:44 +07:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( removeItem ! = null ) {
2025-08-04 17:42:39 +07:00
return removeItem ( product , variant ) ;
2025-07-30 22:38:44 +07:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeItem ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeItem ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( removeItem ! = null ) {
return removeItem ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _RemoveItem implements CheckoutEvent {
2025-08-04 17:42:39 +07:00
const factory _RemoveItem (
final Product product , final ProductVariant ? variant ) = _ $RemoveItemImpl ;
2025-07-30 22:38:44 +07:00
Product get product ;
2025-08-04 17:42:39 +07:00
ProductVariant ? get variant ;
2025-07-30 22:38:44 +07:00
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $RemoveItemImplCopyWith < _ $RemoveItemImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
2025-08-02 11:06:41 +07:00
/// @nodoc
abstract class _ $ $DeleteItemImplCopyWith < $Res > {
factory _ $ $DeleteItemImplCopyWith (
_ $DeleteItemImpl value , $Res Function ( _ $DeleteItemImpl ) then ) =
__ $ $DeleteItemImplCopyWithImpl < $Res > ;
@ useResult
2025-08-04 17:42:39 +07:00
$Res call ( { Product product , ProductVariant ? variant } ) ;
2025-08-02 11:06:41 +07:00
}
/// @nodoc
class __ $ $DeleteItemImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $DeleteItemImpl >
implements _ $ $DeleteItemImplCopyWith < $Res > {
__ $ $DeleteItemImplCopyWithImpl (
_ $DeleteItemImpl _value , $Res Function ( _ $DeleteItemImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? product = null ,
2025-08-04 17:42:39 +07:00
Object ? variant = freezed ,
2025-08-02 11:06:41 +07:00
} ) {
return _then ( _ $DeleteItemImpl (
null = = product
? _value . product
: product // ignore: cast_nullable_to_non_nullable
as Product ,
2025-08-04 17:42:39 +07:00
freezed = = variant
? _value . variant
: variant // ignore: cast_nullable_to_non_nullable
as ProductVariant ? ,
2025-08-02 11:06:41 +07:00
) ) ;
}
}
/// @nodoc
class _ $DeleteItemImpl implements _DeleteItem {
2025-08-04 17:42:39 +07:00
const _ $DeleteItemImpl ( this . product , this . variant ) ;
2025-08-02 11:06:41 +07:00
@ override
final Product product ;
2025-08-04 17:42:39 +07:00
@ override
final ProductVariant ? variant ;
2025-08-02 11:06:41 +07:00
@ override
String toString ( ) {
2025-08-04 17:42:39 +07:00
return ' CheckoutEvent.deleteItem(product: $ product , variant: $ variant ) ' ;
2025-08-02 11:06:41 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $DeleteItemImpl & &
2025-08-04 17:42:39 +07:00
( identical ( other . product , product ) | | other . product = = product ) & &
( identical ( other . variant , variant ) | | other . variant = = variant ) ) ;
2025-08-02 11:06:41 +07:00
}
@ override
2025-08-04 17:42:39 +07:00
int get hashCode = > Object . hash ( runtimeType , product , variant ) ;
2025-08-02 11:06:41 +07:00
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $DeleteItemImplCopyWith < _ $DeleteItemImpl > get copyWith = >
__ $ $DeleteItemImplCopyWithImpl < _ $DeleteItemImpl > ( this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-08-02 11:06:41 +07:00
} ) {
2025-08-04 17:42:39 +07:00
return deleteItem ( product , variant ) ;
2025-08-02 11:06:41 +07:00
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-08-02 11:06:41 +07:00
} ) {
2025-08-04 17:42:39 +07:00
return deleteItem ? . call ( product , variant ) ;
2025-08-02 11:06:41 +07:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-08-02 11:06:41 +07:00
required TResult orElse ( ) ,
} ) {
if ( deleteItem ! = null ) {
2025-08-04 17:42:39 +07:00
return deleteItem ( product , variant ) ;
2025-08-02 11:06:41 +07:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
required TResult Function ( _DeleteItem value ) deleteItem ,
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-08-02 11:06:41 +07:00
} ) {
return deleteItem ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-08-02 11:06:41 +07:00
} ) {
return deleteItem ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
TResult Function ( _DeleteItem value ) ? deleteItem ,
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-08-02 11:06:41 +07:00
required TResult orElse ( ) ,
} ) {
if ( deleteItem ! = null ) {
return deleteItem ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _DeleteItem implements CheckoutEvent {
2025-08-04 17:42:39 +07:00
const factory _DeleteItem (
final Product product , final ProductVariant ? variant ) = _ $DeleteItemImpl ;
2025-08-02 11:06:41 +07:00
Product get product ;
2025-08-04 17:42:39 +07:00
ProductVariant ? get variant ;
2025-08-02 11:06:41 +07:00
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $DeleteItemImplCopyWith < _ $DeleteItemImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
2025-07-30 22:38:44 +07:00
/// @nodoc
abstract class _ $ $AddDiscountImplCopyWith < $Res > {
factory _ $ $AddDiscountImplCopyWith (
_ $AddDiscountImpl value , $Res Function ( _ $AddDiscountImpl ) then ) =
__ $ $AddDiscountImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { Discount discount } ) ;
}
/// @nodoc
class __ $ $AddDiscountImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $AddDiscountImpl >
implements _ $ $AddDiscountImplCopyWith < $Res > {
__ $ $AddDiscountImplCopyWithImpl (
_ $AddDiscountImpl _value , $Res Function ( _ $AddDiscountImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? discount = null ,
} ) {
return _then ( _ $AddDiscountImpl (
null = = discount
? _value . discount
: discount // ignore: cast_nullable_to_non_nullable
as Discount ,
) ) ;
}
}
/// @nodoc
class _ $AddDiscountImpl implements _AddDiscount {
const _ $AddDiscountImpl ( this . discount ) ;
@ override
final Discount discount ;
@ override
String toString ( ) {
return ' CheckoutEvent.addDiscount(discount: $ discount ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $AddDiscountImpl & &
( identical ( other . discount , discount ) | |
other . discount = = discount ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , discount ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $AddDiscountImplCopyWith < _ $AddDiscountImpl > get copyWith = >
__ $ $AddDiscountImplCopyWithImpl < _ $AddDiscountImpl > ( this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addDiscount ( discount ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addDiscount ? . call ( discount ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( addDiscount ! = null ) {
return addDiscount ( discount ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addDiscount ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addDiscount ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( addDiscount ! = null ) {
return addDiscount ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _AddDiscount implements CheckoutEvent {
const factory _AddDiscount ( final Discount discount ) = _ $AddDiscountImpl ;
Discount get discount ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $AddDiscountImplCopyWith < _ $AddDiscountImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $RemoveDiscountImplCopyWith < $Res > {
factory _ $ $RemoveDiscountImplCopyWith ( _ $RemoveDiscountImpl value ,
$Res Function ( _ $RemoveDiscountImpl ) then ) =
__ $ $RemoveDiscountImplCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $ $RemoveDiscountImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $RemoveDiscountImpl >
implements _ $ $RemoveDiscountImplCopyWith < $Res > {
__ $ $RemoveDiscountImplCopyWithImpl (
_ $RemoveDiscountImpl _value , $Res Function ( _ $RemoveDiscountImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _ $RemoveDiscountImpl implements _RemoveDiscount {
const _ $RemoveDiscountImpl ( ) ;
@ override
String toString ( ) {
return ' CheckoutEvent.removeDiscount() ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & & other is _ $RemoveDiscountImpl ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeDiscount ( ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeDiscount ? . call ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( removeDiscount ! = null ) {
return removeDiscount ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeDiscount ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeDiscount ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( removeDiscount ! = null ) {
return removeDiscount ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _RemoveDiscount implements CheckoutEvent {
const factory _RemoveDiscount ( ) = _ $RemoveDiscountImpl ;
}
/// @nodoc
abstract class _ $ $AddTaxImplCopyWith < $Res > {
factory _ $ $AddTaxImplCopyWith (
_ $AddTaxImpl value , $Res Function ( _ $AddTaxImpl ) then ) =
__ $ $AddTaxImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { int tax } ) ;
}
/// @nodoc
class __ $ $AddTaxImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $AddTaxImpl >
implements _ $ $AddTaxImplCopyWith < $Res > {
__ $ $AddTaxImplCopyWithImpl (
_ $AddTaxImpl _value , $Res Function ( _ $AddTaxImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? tax = null ,
} ) {
return _then ( _ $AddTaxImpl (
null = = tax
? _value . tax
: tax // ignore: cast_nullable_to_non_nullable
as int ,
) ) ;
}
}
/// @nodoc
class _ $AddTaxImpl implements _AddTax {
const _ $AddTaxImpl ( this . tax ) ;
@ override
final int tax ;
@ override
String toString ( ) {
return ' CheckoutEvent.addTax(tax: $ tax ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $AddTaxImpl & &
( identical ( other . tax , tax ) | | other . tax = = tax ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , tax ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $AddTaxImplCopyWith < _ $AddTaxImpl > get copyWith = >
__ $ $AddTaxImplCopyWithImpl < _ $AddTaxImpl > ( this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addTax ( tax ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addTax ? . call ( tax ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( addTax ! = null ) {
return addTax ( tax ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addTax ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addTax ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( addTax ! = null ) {
return addTax ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _AddTax implements CheckoutEvent {
const factory _AddTax ( final int tax ) = _ $AddTaxImpl ;
int get tax ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $AddTaxImplCopyWith < _ $AddTaxImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $AddServiceChargeImplCopyWith < $Res > {
factory _ $ $AddServiceChargeImplCopyWith ( _ $AddServiceChargeImpl value ,
$Res Function ( _ $AddServiceChargeImpl ) then ) =
__ $ $AddServiceChargeImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { int serviceCharge } ) ;
}
/// @nodoc
class __ $ $AddServiceChargeImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $AddServiceChargeImpl >
implements _ $ $AddServiceChargeImplCopyWith < $Res > {
__ $ $AddServiceChargeImplCopyWithImpl ( _ $AddServiceChargeImpl _value ,
$Res Function ( _ $AddServiceChargeImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? serviceCharge = null ,
} ) {
return _then ( _ $AddServiceChargeImpl (
null = = serviceCharge
? _value . serviceCharge
: serviceCharge // ignore: cast_nullable_to_non_nullable
as int ,
) ) ;
}
}
/// @nodoc
class _ $AddServiceChargeImpl implements _AddServiceCharge {
const _ $AddServiceChargeImpl ( this . serviceCharge ) ;
@ override
final int serviceCharge ;
@ override
String toString ( ) {
return ' CheckoutEvent.addServiceCharge(serviceCharge: $ serviceCharge ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $AddServiceChargeImpl & &
( identical ( other . serviceCharge , serviceCharge ) | |
other . serviceCharge = = serviceCharge ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , serviceCharge ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $AddServiceChargeImplCopyWith < _ $AddServiceChargeImpl > get copyWith = >
__ $ $AddServiceChargeImplCopyWithImpl < _ $AddServiceChargeImpl > (
this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addServiceCharge ( serviceCharge ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addServiceCharge ? . call ( serviceCharge ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( addServiceCharge ! = null ) {
return addServiceCharge ( serviceCharge ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addServiceCharge ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return addServiceCharge ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( addServiceCharge ! = null ) {
return addServiceCharge ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _AddServiceCharge implements CheckoutEvent {
const factory _AddServiceCharge ( final int serviceCharge ) =
_ $AddServiceChargeImpl ;
int get serviceCharge ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $AddServiceChargeImplCopyWith < _ $AddServiceChargeImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $RemoveTaxImplCopyWith < $Res > {
factory _ $ $RemoveTaxImplCopyWith (
_ $RemoveTaxImpl value , $Res Function ( _ $RemoveTaxImpl ) then ) =
__ $ $RemoveTaxImplCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $ $RemoveTaxImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $RemoveTaxImpl >
implements _ $ $RemoveTaxImplCopyWith < $Res > {
__ $ $RemoveTaxImplCopyWithImpl (
_ $RemoveTaxImpl _value , $Res Function ( _ $RemoveTaxImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _ $RemoveTaxImpl implements _RemoveTax {
const _ $RemoveTaxImpl ( ) ;
@ override
String toString ( ) {
return ' CheckoutEvent.removeTax() ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & & other is _ $RemoveTaxImpl ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeTax ( ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeTax ? . call ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( removeTax ! = null ) {
return removeTax ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeTax ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeTax ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( removeTax ! = null ) {
return removeTax ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _RemoveTax implements CheckoutEvent {
const factory _RemoveTax ( ) = _ $RemoveTaxImpl ;
}
/// @nodoc
abstract class _ $ $RemoveServiceChargeImplCopyWith < $Res > {
factory _ $ $RemoveServiceChargeImplCopyWith ( _ $RemoveServiceChargeImpl value ,
$Res Function ( _ $RemoveServiceChargeImpl ) then ) =
__ $ $RemoveServiceChargeImplCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $ $RemoveServiceChargeImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $RemoveServiceChargeImpl >
implements _ $ $RemoveServiceChargeImplCopyWith < $Res > {
__ $ $RemoveServiceChargeImplCopyWithImpl ( _ $RemoveServiceChargeImpl _value ,
$Res Function ( _ $RemoveServiceChargeImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _ $RemoveServiceChargeImpl implements _RemoveServiceCharge {
const _ $RemoveServiceChargeImpl ( ) ;
@ override
String toString ( ) {
return ' CheckoutEvent.removeServiceCharge() ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $RemoveServiceChargeImpl ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeServiceCharge ( ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeServiceCharge ? . call ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( removeServiceCharge ! = null ) {
return removeServiceCharge ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeServiceCharge ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return removeServiceCharge ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( removeServiceCharge ! = null ) {
return removeServiceCharge ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _RemoveServiceCharge implements CheckoutEvent {
const factory _RemoveServiceCharge ( ) = _ $RemoveServiceChargeImpl ;
}
/// @nodoc
abstract class _ $ $UpdateOrderTypeImplCopyWith < $Res > {
factory _ $ $UpdateOrderTypeImplCopyWith ( _ $UpdateOrderTypeImpl value ,
$Res Function ( _ $UpdateOrderTypeImpl ) then ) =
__ $ $UpdateOrderTypeImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { OrderType orderType } ) ;
}
/// @nodoc
class __ $ $UpdateOrderTypeImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $UpdateOrderTypeImpl >
implements _ $ $UpdateOrderTypeImplCopyWith < $Res > {
__ $ $UpdateOrderTypeImplCopyWithImpl (
_ $UpdateOrderTypeImpl _value , $Res Function ( _ $UpdateOrderTypeImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? orderType = null ,
} ) {
return _then ( _ $UpdateOrderTypeImpl (
null = = orderType
? _value . orderType
: orderType // ignore: cast_nullable_to_non_nullable
as OrderType ,
) ) ;
}
}
/// @nodoc
class _ $UpdateOrderTypeImpl implements _UpdateOrderType {
const _ $UpdateOrderTypeImpl ( this . orderType ) ;
@ override
final OrderType orderType ;
@ override
String toString ( ) {
return ' CheckoutEvent.updateOrderType(orderType: $ orderType ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $UpdateOrderTypeImpl & &
( identical ( other . orderType , orderType ) | |
other . orderType = = orderType ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , orderType ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $UpdateOrderTypeImplCopyWith < _ $UpdateOrderTypeImpl > get copyWith = >
__ $ $UpdateOrderTypeImplCopyWithImpl < _ $UpdateOrderTypeImpl > (
this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return updateOrderType ( orderType ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return updateOrderType ? . call ( orderType ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( updateOrderType ! = null ) {
return updateOrderType ( orderType ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return updateOrderType ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return updateOrderType ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( updateOrderType ! = null ) {
return updateOrderType ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _UpdateOrderType implements CheckoutEvent {
const factory _UpdateOrderType ( final OrderType orderType ) =
_ $UpdateOrderTypeImpl ;
OrderType get orderType ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $UpdateOrderTypeImplCopyWith < _ $UpdateOrderTypeImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $UpdateItemNotesImplCopyWith < $Res > {
factory _ $ $UpdateItemNotesImplCopyWith ( _ $UpdateItemNotesImpl value ,
$Res Function ( _ $UpdateItemNotesImpl ) then ) =
__ $ $UpdateItemNotesImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { Product product , String notes } ) ;
}
/// @nodoc
class __ $ $UpdateItemNotesImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $UpdateItemNotesImpl >
implements _ $ $UpdateItemNotesImplCopyWith < $Res > {
__ $ $UpdateItemNotesImplCopyWithImpl (
_ $UpdateItemNotesImpl _value , $Res Function ( _ $UpdateItemNotesImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? product = null ,
Object ? notes = null ,
} ) {
return _then ( _ $UpdateItemNotesImpl (
null = = product
? _value . product
: product // ignore: cast_nullable_to_non_nullable
as Product ,
null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
as String ,
) ) ;
}
}
/// @nodoc
class _ $UpdateItemNotesImpl implements _UpdateItemNotes {
const _ $UpdateItemNotesImpl ( this . product , this . notes ) ;
@ override
final Product product ;
@ override
final String notes ;
@ override
String toString ( ) {
return ' CheckoutEvent.updateItemNotes(product: $ product , notes: $ notes ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $UpdateItemNotesImpl & &
( identical ( other . product , product ) | | other . product = = product ) & &
( identical ( other . notes , notes ) | | other . notes = = notes ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , product , notes ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $UpdateItemNotesImplCopyWith < _ $UpdateItemNotesImpl > get copyWith = >
__ $ $UpdateItemNotesImplCopyWithImpl < _ $UpdateItemNotesImpl > (
this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return updateItemNotes ( product , notes ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return updateItemNotes ? . call ( product , notes ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( updateItemNotes ! = null ) {
return updateItemNotes ( product , notes ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return updateItemNotes ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return updateItemNotes ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( updateItemNotes ! = null ) {
return updateItemNotes ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _UpdateItemNotes implements CheckoutEvent {
const factory _UpdateItemNotes ( final Product product , final String notes ) =
_ $UpdateItemNotesImpl ;
Product get product ;
String get notes ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $UpdateItemNotesImplCopyWith < _ $UpdateItemNotesImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $SaveDraftOrderImplCopyWith < $Res > {
factory _ $ $SaveDraftOrderImplCopyWith ( _ $SaveDraftOrderImpl value ,
$Res Function ( _ $SaveDraftOrderImpl ) then ) =
__ $ $SaveDraftOrderImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { int tableNumber , String draftName , int discountAmount } ) ;
}
/// @nodoc
class __ $ $SaveDraftOrderImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $SaveDraftOrderImpl >
implements _ $ $SaveDraftOrderImplCopyWith < $Res > {
__ $ $SaveDraftOrderImplCopyWithImpl (
_ $SaveDraftOrderImpl _value , $Res Function ( _ $SaveDraftOrderImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? tableNumber = null ,
Object ? draftName = null ,
Object ? discountAmount = null ,
} ) {
return _then ( _ $SaveDraftOrderImpl (
null = = tableNumber
? _value . tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
as int ,
null = = draftName
? _value . draftName
: draftName // ignore: cast_nullable_to_non_nullable
as String ,
null = = discountAmount
? _value . discountAmount
: discountAmount // ignore: cast_nullable_to_non_nullable
as int ,
) ) ;
}
}
/// @nodoc
class _ $SaveDraftOrderImpl implements _SaveDraftOrder {
const _ $SaveDraftOrderImpl (
this . tableNumber , this . draftName , this . discountAmount ) ;
@ override
final int tableNumber ;
@ override
final String draftName ;
@ override
final int discountAmount ;
@ override
String toString ( ) {
return ' CheckoutEvent.saveDraftOrder(tableNumber: $ tableNumber , draftName: $ draftName , discountAmount: $ discountAmount ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $SaveDraftOrderImpl & &
( identical ( other . tableNumber , tableNumber ) | |
other . tableNumber = = tableNumber ) & &
( identical ( other . draftName , draftName ) | |
other . draftName = = draftName ) & &
( identical ( other . discountAmount , discountAmount ) | |
other . discountAmount = = discountAmount ) ) ;
}
@ override
int get hashCode = >
Object . hash ( runtimeType , tableNumber , draftName , discountAmount ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $SaveDraftOrderImplCopyWith < _ $SaveDraftOrderImpl > get copyWith = >
__ $ $SaveDraftOrderImplCopyWithImpl < _ $SaveDraftOrderImpl > (
this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return saveDraftOrder ( tableNumber , draftName , discountAmount ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return saveDraftOrder ? . call ( tableNumber , draftName , discountAmount ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( saveDraftOrder ! = null ) {
return saveDraftOrder ( tableNumber , draftName , discountAmount ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return saveDraftOrder ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return saveDraftOrder ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( saveDraftOrder ! = null ) {
return saveDraftOrder ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _SaveDraftOrder implements CheckoutEvent {
const factory _SaveDraftOrder ( final int tableNumber , final String draftName ,
final int discountAmount ) = _ $SaveDraftOrderImpl ;
int get tableNumber ;
String get draftName ;
int get discountAmount ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $SaveDraftOrderImplCopyWith < _ $SaveDraftOrderImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $LoadDraftOrderImplCopyWith < $Res > {
factory _ $ $LoadDraftOrderImplCopyWith ( _ $LoadDraftOrderImpl value ,
$Res Function ( _ $LoadDraftOrderImpl ) then ) =
__ $ $LoadDraftOrderImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { DraftOrderModel data } ) ;
}
/// @nodoc
class __ $ $LoadDraftOrderImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $LoadDraftOrderImpl >
implements _ $ $LoadDraftOrderImplCopyWith < $Res > {
__ $ $LoadDraftOrderImplCopyWithImpl (
_ $LoadDraftOrderImpl _value , $Res Function ( _ $LoadDraftOrderImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? data = null ,
} ) {
return _then ( _ $LoadDraftOrderImpl (
null = = data
? _value . data
: data // ignore: cast_nullable_to_non_nullable
as DraftOrderModel ,
) ) ;
}
}
/// @nodoc
class _ $LoadDraftOrderImpl implements _LoadDraftOrder {
const _ $LoadDraftOrderImpl ( this . data ) ;
@ override
final DraftOrderModel data ;
@ override
String toString ( ) {
return ' CheckoutEvent.loadDraftOrder(data: $ data ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $LoadDraftOrderImpl & &
( identical ( other . data , data ) | | other . data = = data ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , data ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $LoadDraftOrderImplCopyWith < _ $LoadDraftOrderImpl > get copyWith = >
__ $ $LoadDraftOrderImplCopyWithImpl < _ $LoadDraftOrderImpl > (
this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-04 17:42:39 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return loadDraftOrder ( data ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return loadDraftOrder ? . call ( data ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-04 17:42:39 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( loadDraftOrder ! = null ) {
return loadDraftOrder ( data ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
2025-08-02 11:06:41 +07:00
required TResult Function ( _DeleteItem value ) deleteItem ,
2025-07-30 22:38:44 +07:00
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
2025-08-06 18:47:20 +07:00
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return loadDraftOrder ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
} ) {
return loadDraftOrder ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
2025-08-02 11:06:41 +07:00
TResult Function ( _DeleteItem value ) ? deleteItem ,
2025-07-30 22:38:44 +07:00
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
2025-08-06 18:47:20 +07:00
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
2025-07-30 22:38:44 +07:00
required TResult orElse ( ) ,
} ) {
if ( loadDraftOrder ! = null ) {
return loadDraftOrder ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _LoadDraftOrder implements CheckoutEvent {
const factory _LoadDraftOrder ( final DraftOrderModel data ) =
_ $LoadDraftOrderImpl ;
DraftOrderModel get data ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $LoadDraftOrderImplCopyWith < _ $LoadDraftOrderImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
2025-08-06 18:47:20 +07:00
/// @nodoc
abstract class _ $ $UpdateDeliveryTypeImplCopyWith < $Res > {
factory _ $ $UpdateDeliveryTypeImplCopyWith ( _ $UpdateDeliveryTypeImpl value ,
$Res Function ( _ $UpdateDeliveryTypeImpl ) then ) =
__ $ $UpdateDeliveryTypeImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { DeliveryModel delivery } ) ;
}
/// @nodoc
class __ $ $UpdateDeliveryTypeImplCopyWithImpl < $Res >
extends _ $CheckoutEventCopyWithImpl < $Res , _ $UpdateDeliveryTypeImpl >
implements _ $ $UpdateDeliveryTypeImplCopyWith < $Res > {
__ $ $UpdateDeliveryTypeImplCopyWithImpl ( _ $UpdateDeliveryTypeImpl _value ,
$Res Function ( _ $UpdateDeliveryTypeImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-08-06 19:28:51 +07:00
Object ? delivery = null ,
2025-08-06 18:47:20 +07:00
} ) {
return _then ( _ $UpdateDeliveryTypeImpl (
2025-08-06 19:28:51 +07:00
null = = delivery
2025-08-06 18:47:20 +07:00
? _value . delivery
: delivery // ignore: cast_nullable_to_non_nullable
as DeliveryModel ,
) ) ;
}
}
/// @nodoc
class _ $UpdateDeliveryTypeImpl implements _UpdateDeliveryType {
const _ $UpdateDeliveryTypeImpl ( this . delivery ) ;
@ override
final DeliveryModel delivery ;
@ override
String toString ( ) {
return ' CheckoutEvent.updateDeliveryType(delivery: $ delivery ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $UpdateDeliveryTypeImpl & &
2025-08-06 19:28:51 +07:00
( identical ( other . delivery , delivery ) | |
other . delivery = = delivery ) ) ;
2025-08-06 18:47:20 +07:00
}
@ override
2025-08-06 19:28:51 +07:00
int get hashCode = > Object . hash ( runtimeType , delivery ) ;
2025-08-06 18:47:20 +07:00
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $UpdateDeliveryTypeImplCopyWith < _ $UpdateDeliveryTypeImpl > get copyWith = >
__ $ $UpdateDeliveryTypeImplCopyWithImpl < _ $UpdateDeliveryTypeImpl > (
this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
required TResult Function ( List < ProductQuantity > items ) started ,
2025-08-06 18:47:20 +07:00
required TResult Function ( Product product , ProductVariant ? variant ) addItem ,
required TResult Function ( Product product , ProductVariant ? variant )
removeItem ,
required TResult Function ( Product product , ProductVariant ? variant )
deleteItem ,
required TResult Function ( Discount discount ) addDiscount ,
required TResult Function ( ) removeDiscount ,
required TResult Function ( int tax ) addTax ,
required TResult Function ( int serviceCharge ) addServiceCharge ,
required TResult Function ( ) removeTax ,
required TResult Function ( ) removeServiceCharge ,
required TResult Function ( OrderType orderType ) updateOrderType ,
required TResult Function ( Product product , String notes ) updateItemNotes ,
required TResult Function (
int tableNumber , String draftName , int discountAmount )
saveDraftOrder ,
required TResult Function ( DraftOrderModel data ) loadDraftOrder ,
required TResult Function ( DeliveryModel delivery ) updateDeliveryType ,
} ) {
return updateDeliveryType ( delivery ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult ? Function ( List < ProductQuantity > items ) ? started ,
2025-08-06 18:47:20 +07:00
TResult ? Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult ? Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
TResult ? Function ( Discount discount ) ? addDiscount ,
TResult ? Function ( ) ? removeDiscount ,
TResult ? Function ( int tax ) ? addTax ,
TResult ? Function ( int serviceCharge ) ? addServiceCharge ,
TResult ? Function ( ) ? removeTax ,
TResult ? Function ( ) ? removeServiceCharge ,
TResult ? Function ( OrderType orderType ) ? updateOrderType ,
TResult ? Function ( Product product , String notes ) ? updateItemNotes ,
TResult ? Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult ? Function ( DraftOrderModel data ) ? loadDraftOrder ,
TResult ? Function ( DeliveryModel delivery ) ? updateDeliveryType ,
} ) {
return updateDeliveryType ? . call ( delivery ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2025-09-01 22:12:56 +07:00
TResult Function ( List < ProductQuantity > items ) ? started ,
2025-08-06 18:47:20 +07:00
TResult Function ( Product product , ProductVariant ? variant ) ? addItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? removeItem ,
TResult Function ( Product product , ProductVariant ? variant ) ? deleteItem ,
TResult Function ( Discount discount ) ? addDiscount ,
TResult Function ( ) ? removeDiscount ,
TResult Function ( int tax ) ? addTax ,
TResult Function ( int serviceCharge ) ? addServiceCharge ,
TResult Function ( ) ? removeTax ,
TResult Function ( ) ? removeServiceCharge ,
TResult Function ( OrderType orderType ) ? updateOrderType ,
TResult Function ( Product product , String notes ) ? updateItemNotes ,
TResult Function ( int tableNumber , String draftName , int discountAmount ) ?
saveDraftOrder ,
TResult Function ( DraftOrderModel data ) ? loadDraftOrder ,
TResult Function ( DeliveryModel delivery ) ? updateDeliveryType ,
required TResult orElse ( ) ,
} ) {
if ( updateDeliveryType ! = null ) {
return updateDeliveryType ( delivery ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Started value ) started ,
required TResult Function ( _AddItem value ) addItem ,
required TResult Function ( _RemoveItem value ) removeItem ,
required TResult Function ( _DeleteItem value ) deleteItem ,
required TResult Function ( _AddDiscount value ) addDiscount ,
required TResult Function ( _RemoveDiscount value ) removeDiscount ,
required TResult Function ( _AddTax value ) addTax ,
required TResult Function ( _AddServiceCharge value ) addServiceCharge ,
required TResult Function ( _RemoveTax value ) removeTax ,
required TResult Function ( _RemoveServiceCharge value ) removeServiceCharge ,
required TResult Function ( _UpdateOrderType value ) updateOrderType ,
required TResult Function ( _UpdateItemNotes value ) updateItemNotes ,
required TResult Function ( _SaveDraftOrder value ) saveDraftOrder ,
required TResult Function ( _LoadDraftOrder value ) loadDraftOrder ,
required TResult Function ( _UpdateDeliveryType value ) updateDeliveryType ,
} ) {
return updateDeliveryType ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Started value ) ? started ,
TResult ? Function ( _AddItem value ) ? addItem ,
TResult ? Function ( _RemoveItem value ) ? removeItem ,
TResult ? Function ( _DeleteItem value ) ? deleteItem ,
TResult ? Function ( _AddDiscount value ) ? addDiscount ,
TResult ? Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult ? Function ( _AddTax value ) ? addTax ,
TResult ? Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult ? Function ( _RemoveTax value ) ? removeTax ,
TResult ? Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult ? Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult ? Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult ? Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult ? Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
TResult ? Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
} ) {
return updateDeliveryType ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Started value ) ? started ,
TResult Function ( _AddItem value ) ? addItem ,
TResult Function ( _RemoveItem value ) ? removeItem ,
TResult Function ( _DeleteItem value ) ? deleteItem ,
TResult Function ( _AddDiscount value ) ? addDiscount ,
TResult Function ( _RemoveDiscount value ) ? removeDiscount ,
TResult Function ( _AddTax value ) ? addTax ,
TResult Function ( _AddServiceCharge value ) ? addServiceCharge ,
TResult Function ( _RemoveTax value ) ? removeTax ,
TResult Function ( _RemoveServiceCharge value ) ? removeServiceCharge ,
TResult Function ( _UpdateOrderType value ) ? updateOrderType ,
TResult Function ( _UpdateItemNotes value ) ? updateItemNotes ,
TResult Function ( _SaveDraftOrder value ) ? saveDraftOrder ,
TResult Function ( _LoadDraftOrder value ) ? loadDraftOrder ,
TResult Function ( _UpdateDeliveryType value ) ? updateDeliveryType ,
required TResult orElse ( ) ,
} ) {
if ( updateDeliveryType ! = null ) {
return updateDeliveryType ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _UpdateDeliveryType implements CheckoutEvent {
const factory _UpdateDeliveryType ( final DeliveryModel delivery ) =
_ $UpdateDeliveryTypeImpl ;
DeliveryModel get delivery ;
/// Create a copy of CheckoutEvent
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $UpdateDeliveryTypeImplCopyWith < _ $UpdateDeliveryTypeImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
2025-07-30 22:38:44 +07:00
/// @nodoc
mixin _ $CheckoutState {
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) initial ,
required TResult Function ( ) loading ,
required TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType )
2025-07-30 22:38:44 +07:00
loaded ,
required TResult Function ( String message ) error ,
required TResult Function ( int orderId ) savedDraftOrder ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ) ? initial ,
TResult ? Function ( ) ? loading ,
TResult ? Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult ? Function ( String message ) ? error ,
TResult ? Function ( int orderId ) ? savedDraftOrder ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? initial ,
TResult Function ( ) ? loading ,
TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult Function ( String message ) ? error ,
TResult Function ( int orderId ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Initial value ) initial ,
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Loaded value ) loaded ,
required TResult Function ( _Error value ) error ,
required TResult Function ( _SavedDraftOrder value ) savedDraftOrder ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Initial value ) ? initial ,
TResult ? Function ( _Loading value ) ? loading ,
TResult ? Function ( _Loaded value ) ? loaded ,
TResult ? Function ( _Error value ) ? error ,
TResult ? Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Initial value ) ? initial ,
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Loaded value ) ? loaded ,
TResult Function ( _Error value ) ? error ,
TResult Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $CheckoutStateCopyWith < $Res > {
factory $CheckoutStateCopyWith (
CheckoutState value , $Res Function ( CheckoutState ) then ) =
_ $CheckoutStateCopyWithImpl < $Res , CheckoutState > ;
}
/// @nodoc
class _ $CheckoutStateCopyWithImpl < $Res , $Val extends CheckoutState >
implements $CheckoutStateCopyWith < $Res > {
_ $CheckoutStateCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
abstract class _ $ $InitialImplCopyWith < $Res > {
factory _ $ $InitialImplCopyWith (
_ $InitialImpl value , $Res Function ( _ $InitialImpl ) then ) =
__ $ $InitialImplCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $ $InitialImplCopyWithImpl < $Res >
extends _ $CheckoutStateCopyWithImpl < $Res , _ $InitialImpl >
implements _ $ $InitialImplCopyWith < $Res > {
__ $ $InitialImplCopyWithImpl (
_ $InitialImpl _value , $Res Function ( _ $InitialImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _ $InitialImpl implements _Initial {
const _ $InitialImpl ( ) ;
@ override
String toString ( ) {
return ' CheckoutState.initial() ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & & other is _ $InitialImpl ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) initial ,
required TResult Function ( ) loading ,
required TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType )
2025-07-30 22:38:44 +07:00
loaded ,
required TResult Function ( String message ) error ,
required TResult Function ( int orderId ) savedDraftOrder ,
} ) {
return initial ( ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ) ? initial ,
TResult ? Function ( ) ? loading ,
TResult ? Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult ? Function ( String message ) ? error ,
TResult ? Function ( int orderId ) ? savedDraftOrder ,
} ) {
return initial ? . call ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? initial ,
TResult Function ( ) ? loading ,
TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult Function ( String message ) ? error ,
TResult Function ( int orderId ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( initial ! = null ) {
return initial ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Initial value ) initial ,
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Loaded value ) loaded ,
required TResult Function ( _Error value ) error ,
required TResult Function ( _SavedDraftOrder value ) savedDraftOrder ,
} ) {
return initial ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Initial value ) ? initial ,
TResult ? Function ( _Loading value ) ? loading ,
TResult ? Function ( _Loaded value ) ? loaded ,
TResult ? Function ( _Error value ) ? error ,
TResult ? Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
} ) {
return initial ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Initial value ) ? initial ,
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Loaded value ) ? loaded ,
TResult Function ( _Error value ) ? error ,
TResult Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( initial ! = null ) {
return initial ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _Initial implements CheckoutState {
const factory _Initial ( ) = _ $InitialImpl ;
}
/// @nodoc
abstract class _ $ $LoadingImplCopyWith < $Res > {
factory _ $ $LoadingImplCopyWith (
_ $LoadingImpl value , $Res Function ( _ $LoadingImpl ) then ) =
__ $ $LoadingImplCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $ $LoadingImplCopyWithImpl < $Res >
extends _ $CheckoutStateCopyWithImpl < $Res , _ $LoadingImpl >
implements _ $ $LoadingImplCopyWith < $Res > {
__ $ $LoadingImplCopyWithImpl (
_ $LoadingImpl _value , $Res Function ( _ $LoadingImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _ $LoadingImpl implements _Loading {
const _ $LoadingImpl ( ) ;
@ override
String toString ( ) {
return ' CheckoutState.loading() ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & & other is _ $LoadingImpl ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) initial ,
required TResult Function ( ) loading ,
required TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType )
2025-07-30 22:38:44 +07:00
loaded ,
required TResult Function ( String message ) error ,
required TResult Function ( int orderId ) savedDraftOrder ,
} ) {
return loading ( ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ) ? initial ,
TResult ? Function ( ) ? loading ,
TResult ? Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult ? Function ( String message ) ? error ,
TResult ? Function ( int orderId ) ? savedDraftOrder ,
} ) {
return loading ? . call ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? initial ,
TResult Function ( ) ? loading ,
TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult Function ( String message ) ? error ,
TResult Function ( int orderId ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( loading ! = null ) {
return loading ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Initial value ) initial ,
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Loaded value ) loaded ,
required TResult Function ( _Error value ) error ,
required TResult Function ( _SavedDraftOrder value ) savedDraftOrder ,
} ) {
return loading ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Initial value ) ? initial ,
TResult ? Function ( _Loading value ) ? loading ,
TResult ? Function ( _Loaded value ) ? loaded ,
TResult ? Function ( _Error value ) ? error ,
TResult ? Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
} ) {
return loading ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Initial value ) ? initial ,
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Loaded value ) ? loaded ,
TResult Function ( _Error value ) ? error ,
TResult Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( loading ! = null ) {
return loading ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _Loading implements CheckoutState {
const factory _Loading ( ) = _ $LoadingImpl ;
}
/// @nodoc
abstract class _ $ $LoadedImplCopyWith < $Res > {
factory _ $ $LoadedImplCopyWith (
_ $LoadedImpl value , $Res Function ( _ $LoadedImpl ) then ) =
__ $ $LoadedImplCopyWithImpl < $Res > ;
@ useResult
$Res call (
{ List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType } ) ;
2025-07-30 22:38:44 +07:00
}
/// @nodoc
class __ $ $LoadedImplCopyWithImpl < $Res >
extends _ $CheckoutStateCopyWithImpl < $Res , _ $LoadedImpl >
implements _ $ $LoadedImplCopyWith < $Res > {
__ $ $LoadedImplCopyWithImpl (
_ $LoadedImpl _value , $Res Function ( _ $LoadedImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? items = null ,
Object ? discountModel = freezed ,
Object ? discount = null ,
Object ? discountAmount = null ,
Object ? tax = null ,
Object ? serviceCharge = null ,
Object ? totalQuantity = null ,
Object ? totalPrice = null ,
Object ? draftName = null ,
Object ? orderType = null ,
2025-08-06 18:47:20 +07:00
Object ? deliveryType = freezed ,
2025-07-30 22:38:44 +07:00
} ) {
return _then ( _ $LoadedImpl (
null = = items
? _value . _items
: items // ignore: cast_nullable_to_non_nullable
as List < ProductQuantity > ,
freezed = = discountModel
? _value . discountModel
: discountModel // ignore: cast_nullable_to_non_nullable
as Discount ? ,
null = = discount
? _value . discount
: discount // ignore: cast_nullable_to_non_nullable
as int ,
null = = discountAmount
? _value . discountAmount
: discountAmount // ignore: cast_nullable_to_non_nullable
as int ,
null = = tax
? _value . tax
: tax // ignore: cast_nullable_to_non_nullable
as int ,
null = = serviceCharge
? _value . serviceCharge
: serviceCharge // ignore: cast_nullable_to_non_nullable
as int ,
null = = totalQuantity
? _value . totalQuantity
: totalQuantity // ignore: cast_nullable_to_non_nullable
as int ,
null = = totalPrice
? _value . totalPrice
: totalPrice // ignore: cast_nullable_to_non_nullable
as int ,
null = = draftName
? _value . draftName
: draftName // ignore: cast_nullable_to_non_nullable
as String ,
null = = orderType
? _value . orderType
: orderType // ignore: cast_nullable_to_non_nullable
as OrderType ,
2025-08-06 18:47:20 +07:00
freezed = = deliveryType
? _value . deliveryType
: deliveryType // ignore: cast_nullable_to_non_nullable
as DeliveryModel ? ,
2025-07-30 22:38:44 +07:00
) ) ;
}
}
/// @nodoc
class _ $LoadedImpl implements _Loaded {
const _ $LoadedImpl (
final List < ProductQuantity > items ,
this . discountModel ,
this . discount ,
this . discountAmount ,
this . tax ,
this . serviceCharge ,
this . totalQuantity ,
this . totalPrice ,
this . draftName ,
2025-08-06 18:47:20 +07:00
this . orderType ,
this . deliveryType )
2025-07-30 22:38:44 +07:00
: _items = items ;
final List < ProductQuantity > _items ;
@ override
List < ProductQuantity > get items {
if ( _items is EqualUnmodifiableListView ) return _items ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _items ) ;
}
@ override
final Discount ? discountModel ;
@ override
final int discount ;
@ override
final int discountAmount ;
@ override
final int tax ;
@ override
final int serviceCharge ;
@ override
final int totalQuantity ;
@ override
final int totalPrice ;
@ override
final String draftName ;
@ override
final OrderType orderType ;
2025-08-06 18:47:20 +07:00
@ override
final DeliveryModel ? deliveryType ;
2025-07-30 22:38:44 +07:00
@ override
String toString ( ) {
2025-08-06 18:47:20 +07:00
return ' CheckoutState.loaded(items: $ items , discountModel: $ discountModel , discount: $ discount , discountAmount: $ discountAmount , tax: $ tax , serviceCharge: $ serviceCharge , totalQuantity: $ totalQuantity , totalPrice: $ totalPrice , draftName: $ draftName , orderType: $ orderType , deliveryType: $ deliveryType ) ' ;
2025-07-30 22:38:44 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $LoadedImpl & &
const DeepCollectionEquality ( ) . equals ( other . _items , _items ) & &
( identical ( other . discountModel , discountModel ) | |
other . discountModel = = discountModel ) & &
( identical ( other . discount , discount ) | |
other . discount = = discount ) & &
( identical ( other . discountAmount , discountAmount ) | |
other . discountAmount = = discountAmount ) & &
( identical ( other . tax , tax ) | | other . tax = = tax ) & &
( identical ( other . serviceCharge , serviceCharge ) | |
other . serviceCharge = = serviceCharge ) & &
( identical ( other . totalQuantity , totalQuantity ) | |
other . totalQuantity = = totalQuantity ) & &
( identical ( other . totalPrice , totalPrice ) | |
other . totalPrice = = totalPrice ) & &
( identical ( other . draftName , draftName ) | |
other . draftName = = draftName ) & &
( identical ( other . orderType , orderType ) | |
2025-08-06 18:47:20 +07:00
other . orderType = = orderType ) & &
2025-08-06 19:28:51 +07:00
( identical ( other . deliveryType , deliveryType ) | |
other . deliveryType = = deliveryType ) ) ;
2025-07-30 22:38:44 +07:00
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
const DeepCollectionEquality ( ) . hash ( _items ) ,
discountModel ,
discount ,
discountAmount ,
tax ,
serviceCharge ,
totalQuantity ,
totalPrice ,
draftName ,
2025-08-06 18:47:20 +07:00
orderType ,
2025-08-06 19:28:51 +07:00
deliveryType ) ;
2025-07-30 22:38:44 +07:00
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $LoadedImplCopyWith < _ $LoadedImpl > get copyWith = >
__ $ $LoadedImplCopyWithImpl < _ $LoadedImpl > ( this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) initial ,
required TResult Function ( ) loading ,
required TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType )
2025-07-30 22:38:44 +07:00
loaded ,
required TResult Function ( String message ) error ,
required TResult Function ( int orderId ) savedDraftOrder ,
} ) {
2025-08-06 18:47:20 +07:00
return loaded (
items ,
discountModel ,
discount ,
discountAmount ,
tax ,
serviceCharge ,
totalQuantity ,
totalPrice ,
draftName ,
orderType ,
deliveryType ) ;
2025-07-30 22:38:44 +07:00
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ) ? initial ,
TResult ? Function ( ) ? loading ,
TResult ? Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult ? Function ( String message ) ? error ,
TResult ? Function ( int orderId ) ? savedDraftOrder ,
} ) {
2025-08-06 18:47:20 +07:00
return loaded ? . call (
items ,
discountModel ,
discount ,
discountAmount ,
tax ,
serviceCharge ,
totalQuantity ,
totalPrice ,
draftName ,
orderType ,
deliveryType ) ;
2025-07-30 22:38:44 +07:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? initial ,
TResult Function ( ) ? loading ,
TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult Function ( String message ) ? error ,
TResult Function ( int orderId ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( loaded ! = null ) {
2025-08-06 18:47:20 +07:00
return loaded (
items ,
discountModel ,
discount ,
discountAmount ,
tax ,
serviceCharge ,
totalQuantity ,
totalPrice ,
draftName ,
orderType ,
deliveryType ) ;
2025-07-30 22:38:44 +07:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Initial value ) initial ,
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Loaded value ) loaded ,
required TResult Function ( _Error value ) error ,
required TResult Function ( _SavedDraftOrder value ) savedDraftOrder ,
} ) {
return loaded ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Initial value ) ? initial ,
TResult ? Function ( _Loading value ) ? loading ,
TResult ? Function ( _Loaded value ) ? loaded ,
TResult ? Function ( _Error value ) ? error ,
TResult ? Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
} ) {
return loaded ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Initial value ) ? initial ,
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Loaded value ) ? loaded ,
TResult Function ( _Error value ) ? error ,
TResult Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( loaded ! = null ) {
return loaded ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _Loaded implements CheckoutState {
const factory _Loaded (
final List < ProductQuantity > items ,
final Discount ? discountModel ,
final int discount ,
final int discountAmount ,
final int tax ,
final int serviceCharge ,
final int totalQuantity ,
final int totalPrice ,
final String draftName ,
2025-08-06 18:47:20 +07:00
final OrderType orderType ,
final DeliveryModel ? deliveryType ) = _ $LoadedImpl ;
2025-07-30 22:38:44 +07:00
List < ProductQuantity > get items ;
Discount ? get discountModel ;
int get discount ;
int get discountAmount ;
int get tax ;
int get serviceCharge ;
int get totalQuantity ;
int get totalPrice ;
String get draftName ;
OrderType get orderType ;
2025-08-06 18:47:20 +07:00
DeliveryModel ? get deliveryType ;
2025-07-30 22:38:44 +07:00
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $LoadedImplCopyWith < _ $LoadedImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $ErrorImplCopyWith < $Res > {
factory _ $ $ErrorImplCopyWith (
_ $ErrorImpl value , $Res Function ( _ $ErrorImpl ) then ) =
__ $ $ErrorImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { String message } ) ;
}
/// @nodoc
class __ $ $ErrorImplCopyWithImpl < $Res >
extends _ $CheckoutStateCopyWithImpl < $Res , _ $ErrorImpl >
implements _ $ $ErrorImplCopyWith < $Res > {
__ $ $ErrorImplCopyWithImpl (
_ $ErrorImpl _value , $Res Function ( _ $ErrorImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? message = null ,
} ) {
return _then ( _ $ErrorImpl (
null = = message
? _value . message
: message // ignore: cast_nullable_to_non_nullable
as String ,
) ) ;
}
}
/// @nodoc
class _ $ErrorImpl implements _Error {
const _ $ErrorImpl ( this . message ) ;
@ override
final String message ;
@ override
String toString ( ) {
return ' CheckoutState.error(message: $ message ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $ErrorImpl & &
( identical ( other . message , message ) | | other . message = = message ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , message ) ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $ErrorImplCopyWith < _ $ErrorImpl > get copyWith = >
__ $ $ErrorImplCopyWithImpl < _ $ErrorImpl > ( this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) initial ,
required TResult Function ( ) loading ,
required TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType )
2025-07-30 22:38:44 +07:00
loaded ,
required TResult Function ( String message ) error ,
required TResult Function ( int orderId ) savedDraftOrder ,
} ) {
return error ( message ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ) ? initial ,
TResult ? Function ( ) ? loading ,
TResult ? Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult ? Function ( String message ) ? error ,
TResult ? Function ( int orderId ) ? savedDraftOrder ,
} ) {
return error ? . call ( message ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? initial ,
TResult Function ( ) ? loading ,
TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult Function ( String message ) ? error ,
TResult Function ( int orderId ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( error ! = null ) {
return error ( message ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Initial value ) initial ,
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Loaded value ) loaded ,
required TResult Function ( _Error value ) error ,
required TResult Function ( _SavedDraftOrder value ) savedDraftOrder ,
} ) {
return error ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Initial value ) ? initial ,
TResult ? Function ( _Loading value ) ? loading ,
TResult ? Function ( _Loaded value ) ? loaded ,
TResult ? Function ( _Error value ) ? error ,
TResult ? Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
} ) {
return error ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Initial value ) ? initial ,
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Loaded value ) ? loaded ,
TResult Function ( _Error value ) ? error ,
TResult Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( error ! = null ) {
return error ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _Error implements CheckoutState {
const factory _Error ( final String message ) = _ $ErrorImpl ;
String get message ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $ErrorImplCopyWith < _ $ErrorImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $SavedDraftOrderImplCopyWith < $Res > {
factory _ $ $SavedDraftOrderImplCopyWith ( _ $SavedDraftOrderImpl value ,
$Res Function ( _ $SavedDraftOrderImpl ) then ) =
__ $ $SavedDraftOrderImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { int orderId } ) ;
}
/// @nodoc
class __ $ $SavedDraftOrderImplCopyWithImpl < $Res >
extends _ $CheckoutStateCopyWithImpl < $Res , _ $SavedDraftOrderImpl >
implements _ $ $SavedDraftOrderImplCopyWith < $Res > {
__ $ $SavedDraftOrderImplCopyWithImpl (
_ $SavedDraftOrderImpl _value , $Res Function ( _ $SavedDraftOrderImpl ) _then )
: super ( _value , _then ) ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? orderId = null ,
} ) {
return _then ( _ $SavedDraftOrderImpl (
null = = orderId
? _value . orderId
: orderId // ignore: cast_nullable_to_non_nullable
as int ,
) ) ;
}
}
/// @nodoc
class _ $SavedDraftOrderImpl implements _SavedDraftOrder {
const _ $SavedDraftOrderImpl ( this . orderId ) ;
@ override
final int orderId ;
@ override
String toString ( ) {
return ' CheckoutState.savedDraftOrder(orderId: $ orderId ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $SavedDraftOrderImpl & &
( identical ( other . orderId , orderId ) | | other . orderId = = orderId ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , orderId ) ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $SavedDraftOrderImplCopyWith < _ $SavedDraftOrderImpl > get copyWith = >
__ $ $SavedDraftOrderImplCopyWithImpl < _ $SavedDraftOrderImpl > (
this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) initial ,
required TResult Function ( ) loading ,
required TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType )
2025-07-30 22:38:44 +07:00
loaded ,
required TResult Function ( String message ) error ,
required TResult Function ( int orderId ) savedDraftOrder ,
} ) {
return savedDraftOrder ( orderId ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ) ? initial ,
TResult ? Function ( ) ? loading ,
TResult ? Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult ? Function ( String message ) ? error ,
TResult ? Function ( int orderId ) ? savedDraftOrder ,
} ) {
return savedDraftOrder ? . call ( orderId ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? initial ,
TResult Function ( ) ? loading ,
TResult Function (
List < ProductQuantity > items ,
Discount ? discountModel ,
int discount ,
int discountAmount ,
int tax ,
int serviceCharge ,
int totalQuantity ,
int totalPrice ,
String draftName ,
2025-08-06 18:47:20 +07:00
OrderType orderType ,
DeliveryModel ? deliveryType ) ?
2025-07-30 22:38:44 +07:00
loaded ,
TResult Function ( String message ) ? error ,
TResult Function ( int orderId ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( savedDraftOrder ! = null ) {
return savedDraftOrder ( orderId ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _Initial value ) initial ,
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Loaded value ) loaded ,
required TResult Function ( _Error value ) error ,
required TResult Function ( _SavedDraftOrder value ) savedDraftOrder ,
} ) {
return savedDraftOrder ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _Initial value ) ? initial ,
TResult ? Function ( _Loading value ) ? loading ,
TResult ? Function ( _Loaded value ) ? loaded ,
TResult ? Function ( _Error value ) ? error ,
TResult ? Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
} ) {
return savedDraftOrder ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _Initial value ) ? initial ,
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Loaded value ) ? loaded ,
TResult Function ( _Error value ) ? error ,
TResult Function ( _SavedDraftOrder value ) ? savedDraftOrder ,
required TResult orElse ( ) ,
} ) {
if ( savedDraftOrder ! = null ) {
return savedDraftOrder ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _SavedDraftOrder implements CheckoutState {
const factory _SavedDraftOrder ( final int orderId ) = _ $SavedDraftOrderImpl ;
int get orderId ;
/// Create a copy of CheckoutState
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $SavedDraftOrderImplCopyWith < _ $SavedDraftOrderImpl > get copyWith = >
throw _privateConstructorUsedError ;
}