2025-10-27 21:55:19 +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 ' order.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 _ $ListOrder {
List < Order > get orders = > throw _privateConstructorUsedError ;
int get totalCount = > throw _privateConstructorUsedError ;
int get page = > throw _privateConstructorUsedError ;
int get limit = > throw _privateConstructorUsedError ;
int get totalPages = > throw _privateConstructorUsedError ;
/// Create a copy of ListOrder
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$ListOrderCopyWith < ListOrder > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $ListOrderCopyWith < $Res > {
factory $ListOrderCopyWith ( ListOrder value , $Res Function ( ListOrder ) then ) =
_ $ListOrderCopyWithImpl < $Res , ListOrder > ;
@ useResult
$Res call ( {
List < Order > orders ,
int totalCount ,
int page ,
int limit ,
int totalPages ,
} ) ;
}
/// @nodoc
class _ $ListOrderCopyWithImpl < $Res , $Val extends ListOrder >
implements $ListOrderCopyWith < $Res > {
_ $ListOrderCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of ListOrder
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? orders = null ,
Object ? totalCount = null ,
Object ? page = null ,
Object ? limit = null ,
Object ? totalPages = null ,
} ) {
return _then (
_value . copyWith (
orders: null = = orders
? _value . orders
: orders // ignore: cast_nullable_to_non_nullable
as List < Order > ,
totalCount: null = = totalCount
? _value . totalCount
: totalCount // ignore: cast_nullable_to_non_nullable
as int ,
page: null = = page
? _value . page
: page // ignore: cast_nullable_to_non_nullable
as int ,
limit: null = = limit
? _value . limit
: limit // ignore: cast_nullable_to_non_nullable
as int ,
totalPages: null = = totalPages
? _value . totalPages
: totalPages // ignore: cast_nullable_to_non_nullable
as int ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $ListOrderImplCopyWith < $Res >
implements $ListOrderCopyWith < $Res > {
factory _ $ $ListOrderImplCopyWith (
_ $ListOrderImpl value ,
$Res Function ( _ $ListOrderImpl ) then ,
) = __ $ $ListOrderImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
List < Order > orders ,
int totalCount ,
int page ,
int limit ,
int totalPages ,
} ) ;
}
/// @nodoc
class __ $ $ListOrderImplCopyWithImpl < $Res >
extends _ $ListOrderCopyWithImpl < $Res , _ $ListOrderImpl >
implements _ $ $ListOrderImplCopyWith < $Res > {
__ $ $ListOrderImplCopyWithImpl (
_ $ListOrderImpl _value ,
$Res Function ( _ $ListOrderImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of ListOrder
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? orders = null ,
Object ? totalCount = null ,
Object ? page = null ,
Object ? limit = null ,
Object ? totalPages = null ,
} ) {
return _then (
_ $ListOrderImpl (
orders: null = = orders
? _value . _orders
: orders // ignore: cast_nullable_to_non_nullable
as List < Order > ,
totalCount: null = = totalCount
? _value . totalCount
: totalCount // ignore: cast_nullable_to_non_nullable
as int ,
page: null = = page
? _value . page
: page // ignore: cast_nullable_to_non_nullable
as int ,
limit: null = = limit
? _value . limit
: limit // ignore: cast_nullable_to_non_nullable
as int ,
totalPages: null = = totalPages
? _value . totalPages
: totalPages // ignore: cast_nullable_to_non_nullable
as int ,
) ,
) ;
}
}
/// @nodoc
class _ $ListOrderImpl implements _ListOrder {
const _ $ListOrderImpl ( {
required final List < Order > orders ,
required this . totalCount ,
required this . page ,
required this . limit ,
required this . totalPages ,
} ) : _orders = orders ;
final List < Order > _orders ;
@ override
List < Order > get orders {
if ( _orders is EqualUnmodifiableListView ) return _orders ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _orders ) ;
}
@ override
final int totalCount ;
@ override
final int page ;
@ override
final int limit ;
@ override
final int totalPages ;
@ override
String toString ( ) {
return ' ListOrder(orders: $ orders , totalCount: $ totalCount , page: $ page , limit: $ limit , totalPages: $ totalPages ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $ListOrderImpl & &
const DeepCollectionEquality ( ) . equals ( other . _orders , _orders ) & &
( identical ( other . totalCount , totalCount ) | |
other . totalCount = = totalCount ) & &
( identical ( other . page , page ) | | other . page = = page ) & &
( identical ( other . limit , limit ) | | other . limit = = limit ) & &
( identical ( other . totalPages , totalPages ) | |
other . totalPages = = totalPages ) ) ;
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
const DeepCollectionEquality ( ) . hash ( _orders ) ,
totalCount ,
page ,
limit ,
totalPages ,
) ;
/// Create a copy of ListOrder
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $ListOrderImplCopyWith < _ $ListOrderImpl > get copyWith = >
__ $ $ListOrderImplCopyWithImpl < _ $ListOrderImpl > ( this , _ $identity ) ;
}
abstract class _ListOrder implements ListOrder {
const factory _ListOrder ( {
required final List < Order > orders ,
required final int totalCount ,
required final int page ,
required final int limit ,
required final int totalPages ,
} ) = _ $ListOrderImpl ;
@ override
List < Order > get orders ;
@ override
int get totalCount ;
@ override
int get page ;
@ override
int get limit ;
@ override
int get totalPages ;
/// Create a copy of ListOrder
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $ListOrderImplCopyWith < _ $ListOrderImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
mixin _ $Order {
String get id = > throw _privateConstructorUsedError ;
String get orderNumber = > throw _privateConstructorUsedError ;
String get outletId = > throw _privateConstructorUsedError ;
String get userId = > throw _privateConstructorUsedError ;
String get tableNumber = > throw _privateConstructorUsedError ;
String get orderType = > throw _privateConstructorUsedError ;
String get status = > throw _privateConstructorUsedError ;
int get subtotal = > throw _privateConstructorUsedError ;
int get taxAmount = > throw _privateConstructorUsedError ;
int get discountAmount = > throw _privateConstructorUsedError ;
int get totalAmount = > throw _privateConstructorUsedError ;
num get totalCost = > throw _privateConstructorUsedError ;
int get remainingAmount = > throw _privateConstructorUsedError ;
String get paymentStatus = > throw _privateConstructorUsedError ;
int get refundAmount = > throw _privateConstructorUsedError ;
bool get isVoid = > throw _privateConstructorUsedError ;
bool get isRefund = > throw _privateConstructorUsedError ;
String get notes = > throw _privateConstructorUsedError ;
Map < String , dynamic > get metadata = > throw _privateConstructorUsedError ;
DateTime get createdAt = > throw _privateConstructorUsedError ;
DateTime get updatedAt = > throw _privateConstructorUsedError ;
List < OrderItem > get orderItems = > throw _privateConstructorUsedError ;
2025-10-28 00:58:39 +07:00
List < Payment > get payments = > throw _privateConstructorUsedError ;
2025-10-27 21:55:19 +07:00
int get totalPaid = > throw _privateConstructorUsedError ;
int get paymentCount = > throw _privateConstructorUsedError ;
String get splitType = > throw _privateConstructorUsedError ;
/// Create a copy of Order
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$OrderCopyWith < Order > get copyWith = > throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $OrderCopyWith < $Res > {
factory $OrderCopyWith ( Order value , $Res Function ( Order ) then ) =
_ $OrderCopyWithImpl < $Res , Order > ;
@ useResult
$Res call ( {
String id ,
String orderNumber ,
String outletId ,
String userId ,
String tableNumber ,
String orderType ,
String status ,
int subtotal ,
int taxAmount ,
int discountAmount ,
int totalAmount ,
num totalCost ,
int remainingAmount ,
String paymentStatus ,
int refundAmount ,
bool isVoid ,
bool isRefund ,
String notes ,
Map < String , dynamic > metadata ,
DateTime createdAt ,
DateTime updatedAt ,
List < OrderItem > orderItems ,
2025-10-28 00:58:39 +07:00
List < Payment > payments ,
2025-10-27 21:55:19 +07:00
int totalPaid ,
int paymentCount ,
String splitType ,
} ) ;
}
/// @nodoc
class _ $OrderCopyWithImpl < $Res , $Val extends Order >
implements $OrderCopyWith < $Res > {
_ $OrderCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of Order
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? id = null ,
Object ? orderNumber = null ,
Object ? outletId = null ,
Object ? userId = null ,
Object ? tableNumber = null ,
Object ? orderType = null ,
Object ? status = null ,
Object ? subtotal = null ,
Object ? taxAmount = null ,
Object ? discountAmount = null ,
Object ? totalAmount = null ,
Object ? totalCost = null ,
Object ? remainingAmount = null ,
Object ? paymentStatus = null ,
Object ? refundAmount = null ,
Object ? isVoid = null ,
Object ? isRefund = null ,
Object ? notes = null ,
Object ? metadata = null ,
Object ? createdAt = null ,
Object ? updatedAt = null ,
Object ? orderItems = null ,
Object ? payments = null ,
Object ? totalPaid = null ,
Object ? paymentCount = null ,
Object ? splitType = null ,
} ) {
return _then (
_value . copyWith (
id: null = = id
? _value . id
: id // ignore: cast_nullable_to_non_nullable
as String ,
orderNumber: null = = orderNumber
? _value . orderNumber
: orderNumber // ignore: cast_nullable_to_non_nullable
as String ,
outletId: null = = outletId
? _value . outletId
: outletId // ignore: cast_nullable_to_non_nullable
as String ,
userId: null = = userId
? _value . userId
: userId // ignore: cast_nullable_to_non_nullable
as String ,
tableNumber: null = = tableNumber
? _value . tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
as String ,
orderType: null = = orderType
? _value . orderType
: orderType // ignore: cast_nullable_to_non_nullable
as String ,
status: null = = status
? _value . status
: status // ignore: cast_nullable_to_non_nullable
as String ,
subtotal: null = = subtotal
? _value . subtotal
: subtotal // ignore: cast_nullable_to_non_nullable
as int ,
taxAmount: null = = taxAmount
? _value . taxAmount
: taxAmount // ignore: cast_nullable_to_non_nullable
as int ,
discountAmount: null = = discountAmount
? _value . discountAmount
: discountAmount // ignore: cast_nullable_to_non_nullable
as int ,
totalAmount: null = = totalAmount
? _value . totalAmount
: totalAmount // ignore: cast_nullable_to_non_nullable
as int ,
totalCost: null = = totalCost
? _value . totalCost
: totalCost // ignore: cast_nullable_to_non_nullable
as num ,
remainingAmount: null = = remainingAmount
? _value . remainingAmount
: remainingAmount // ignore: cast_nullable_to_non_nullable
as int ,
paymentStatus: null = = paymentStatus
? _value . paymentStatus
: paymentStatus // ignore: cast_nullable_to_non_nullable
as String ,
refundAmount: null = = refundAmount
? _value . refundAmount
: refundAmount // ignore: cast_nullable_to_non_nullable
as int ,
isVoid: null = = isVoid
? _value . isVoid
: isVoid // ignore: cast_nullable_to_non_nullable
as bool ,
isRefund: null = = isRefund
? _value . isRefund
: isRefund // ignore: cast_nullable_to_non_nullable
as bool ,
notes: null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
as String ,
metadata: null = = metadata
? _value . metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map < String , dynamic > ,
createdAt: null = = createdAt
? _value . createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
updatedAt: null = = updatedAt
? _value . updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
orderItems: null = = orderItems
? _value . orderItems
: orderItems // ignore: cast_nullable_to_non_nullable
as List < OrderItem > ,
payments: null = = payments
? _value . payments
: payments // ignore: cast_nullable_to_non_nullable
2025-10-28 00:58:39 +07:00
as List < Payment > ,
2025-10-27 21:55:19 +07:00
totalPaid: null = = totalPaid
? _value . totalPaid
: totalPaid // ignore: cast_nullable_to_non_nullable
as int ,
paymentCount: null = = paymentCount
? _value . paymentCount
: paymentCount // ignore: cast_nullable_to_non_nullable
as int ,
splitType: null = = splitType
? _value . splitType
: splitType // ignore: cast_nullable_to_non_nullable
as String ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $OrderImplCopyWith < $Res > implements $OrderCopyWith < $Res > {
factory _ $ $OrderImplCopyWith (
_ $OrderImpl value ,
$Res Function ( _ $OrderImpl ) then ,
) = __ $ $OrderImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
String id ,
String orderNumber ,
String outletId ,
String userId ,
String tableNumber ,
String orderType ,
String status ,
int subtotal ,
int taxAmount ,
int discountAmount ,
int totalAmount ,
num totalCost ,
int remainingAmount ,
String paymentStatus ,
int refundAmount ,
bool isVoid ,
bool isRefund ,
String notes ,
Map < String , dynamic > metadata ,
DateTime createdAt ,
DateTime updatedAt ,
List < OrderItem > orderItems ,
2025-10-28 00:58:39 +07:00
List < Payment > payments ,
2025-10-27 21:55:19 +07:00
int totalPaid ,
int paymentCount ,
String splitType ,
} ) ;
}
/// @nodoc
class __ $ $OrderImplCopyWithImpl < $Res >
extends _ $OrderCopyWithImpl < $Res , _ $OrderImpl >
implements _ $ $OrderImplCopyWith < $Res > {
__ $ $OrderImplCopyWithImpl (
_ $OrderImpl _value ,
$Res Function ( _ $OrderImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of Order
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? id = null ,
Object ? orderNumber = null ,
Object ? outletId = null ,
Object ? userId = null ,
Object ? tableNumber = null ,
Object ? orderType = null ,
Object ? status = null ,
Object ? subtotal = null ,
Object ? taxAmount = null ,
Object ? discountAmount = null ,
Object ? totalAmount = null ,
Object ? totalCost = null ,
Object ? remainingAmount = null ,
Object ? paymentStatus = null ,
Object ? refundAmount = null ,
Object ? isVoid = null ,
Object ? isRefund = null ,
Object ? notes = null ,
Object ? metadata = null ,
Object ? createdAt = null ,
Object ? updatedAt = null ,
Object ? orderItems = null ,
Object ? payments = null ,
Object ? totalPaid = null ,
Object ? paymentCount = null ,
Object ? splitType = null ,
} ) {
return _then (
_ $OrderImpl (
id: null = = id
? _value . id
: id // ignore: cast_nullable_to_non_nullable
as String ,
orderNumber: null = = orderNumber
? _value . orderNumber
: orderNumber // ignore: cast_nullable_to_non_nullable
as String ,
outletId: null = = outletId
? _value . outletId
: outletId // ignore: cast_nullable_to_non_nullable
as String ,
userId: null = = userId
? _value . userId
: userId // ignore: cast_nullable_to_non_nullable
as String ,
tableNumber: null = = tableNumber
? _value . tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
as String ,
orderType: null = = orderType
? _value . orderType
: orderType // ignore: cast_nullable_to_non_nullable
as String ,
status: null = = status
? _value . status
: status // ignore: cast_nullable_to_non_nullable
as String ,
subtotal: null = = subtotal
? _value . subtotal
: subtotal // ignore: cast_nullable_to_non_nullable
as int ,
taxAmount: null = = taxAmount
? _value . taxAmount
: taxAmount // ignore: cast_nullable_to_non_nullable
as int ,
discountAmount: null = = discountAmount
? _value . discountAmount
: discountAmount // ignore: cast_nullable_to_non_nullable
as int ,
totalAmount: null = = totalAmount
? _value . totalAmount
: totalAmount // ignore: cast_nullable_to_non_nullable
as int ,
totalCost: null = = totalCost
? _value . totalCost
: totalCost // ignore: cast_nullable_to_non_nullable
as num ,
remainingAmount: null = = remainingAmount
? _value . remainingAmount
: remainingAmount // ignore: cast_nullable_to_non_nullable
as int ,
paymentStatus: null = = paymentStatus
? _value . paymentStatus
: paymentStatus // ignore: cast_nullable_to_non_nullable
as String ,
refundAmount: null = = refundAmount
? _value . refundAmount
: refundAmount // ignore: cast_nullable_to_non_nullable
as int ,
isVoid: null = = isVoid
? _value . isVoid
: isVoid // ignore: cast_nullable_to_non_nullable
as bool ,
isRefund: null = = isRefund
? _value . isRefund
: isRefund // ignore: cast_nullable_to_non_nullable
as bool ,
notes: null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
as String ,
metadata: null = = metadata
? _value . _metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map < String , dynamic > ,
createdAt: null = = createdAt
? _value . createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
updatedAt: null = = updatedAt
? _value . updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
orderItems: null = = orderItems
? _value . _orderItems
: orderItems // ignore: cast_nullable_to_non_nullable
as List < OrderItem > ,
payments: null = = payments
? _value . _payments
: payments // ignore: cast_nullable_to_non_nullable
2025-10-28 00:58:39 +07:00
as List < Payment > ,
2025-10-27 21:55:19 +07:00
totalPaid: null = = totalPaid
? _value . totalPaid
: totalPaid // ignore: cast_nullable_to_non_nullable
as int ,
paymentCount: null = = paymentCount
? _value . paymentCount
: paymentCount // ignore: cast_nullable_to_non_nullable
as int ,
splitType: null = = splitType
? _value . splitType
: splitType // ignore: cast_nullable_to_non_nullable
as String ,
) ,
) ;
}
}
/// @nodoc
class _ $OrderImpl implements _Order {
const _ $OrderImpl ( {
required this . id ,
required this . orderNumber ,
required this . outletId ,
required this . userId ,
required this . tableNumber ,
required this . orderType ,
required this . status ,
required this . subtotal ,
required this . taxAmount ,
required this . discountAmount ,
required this . totalAmount ,
required this . totalCost ,
required this . remainingAmount ,
required this . paymentStatus ,
required this . refundAmount ,
required this . isVoid ,
required this . isRefund ,
required this . notes ,
required final Map < String , dynamic > metadata ,
required this . createdAt ,
required this . updatedAt ,
required final List < OrderItem > orderItems ,
2025-10-28 00:58:39 +07:00
required final List < Payment > payments ,
2025-10-27 21:55:19 +07:00
required this . totalPaid ,
required this . paymentCount ,
required this . splitType ,
} ) : _metadata = metadata ,
_orderItems = orderItems ,
_payments = payments ;
@ override
final String id ;
@ override
final String orderNumber ;
@ override
final String outletId ;
@ override
final String userId ;
@ override
final String tableNumber ;
@ override
final String orderType ;
@ override
final String status ;
@ override
final int subtotal ;
@ override
final int taxAmount ;
@ override
final int discountAmount ;
@ override
final int totalAmount ;
@ override
final num totalCost ;
@ override
final int remainingAmount ;
@ override
final String paymentStatus ;
@ override
final int refundAmount ;
@ override
final bool isVoid ;
@ override
final bool isRefund ;
@ override
final String notes ;
final Map < String , dynamic > _metadata ;
@ override
Map < String , dynamic > get metadata {
if ( _metadata is EqualUnmodifiableMapView ) return _metadata ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView ( _metadata ) ;
}
@ override
final DateTime createdAt ;
@ override
final DateTime updatedAt ;
final List < OrderItem > _orderItems ;
@ override
List < OrderItem > get orderItems {
if ( _orderItems is EqualUnmodifiableListView ) return _orderItems ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _orderItems ) ;
}
2025-10-28 00:58:39 +07:00
final List < Payment > _payments ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
List < Payment > get payments {
2025-10-27 21:55:19 +07:00
if ( _payments is EqualUnmodifiableListView ) return _payments ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _payments ) ;
}
@ override
final int totalPaid ;
@ override
final int paymentCount ;
@ override
final String splitType ;
@ override
String toString ( ) {
return ' Order(id: $ id , orderNumber: $ orderNumber , outletId: $ outletId , userId: $ userId , tableNumber: $ tableNumber , orderType: $ orderType , status: $ status , subtotal: $ subtotal , taxAmount: $ taxAmount , discountAmount: $ discountAmount , totalAmount: $ totalAmount , totalCost: $ totalCost , remainingAmount: $ remainingAmount , paymentStatus: $ paymentStatus , refundAmount: $ refundAmount , isVoid: $ isVoid , isRefund: $ isRefund , notes: $ notes , metadata: $ metadata , createdAt: $ createdAt , updatedAt: $ updatedAt , orderItems: $ orderItems , payments: $ payments , totalPaid: $ totalPaid , paymentCount: $ paymentCount , splitType: $ splitType ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $OrderImpl & &
( identical ( other . id , id ) | | other . id = = id ) & &
( identical ( other . orderNumber , orderNumber ) | |
other . orderNumber = = orderNumber ) & &
( identical ( other . outletId , outletId ) | |
other . outletId = = outletId ) & &
( identical ( other . userId , userId ) | | other . userId = = userId ) & &
( identical ( other . tableNumber , tableNumber ) | |
other . tableNumber = = tableNumber ) & &
( identical ( other . orderType , orderType ) | |
other . orderType = = orderType ) & &
( identical ( other . status , status ) | | other . status = = status ) & &
( identical ( other . subtotal , subtotal ) | |
other . subtotal = = subtotal ) & &
( identical ( other . taxAmount , taxAmount ) | |
other . taxAmount = = taxAmount ) & &
( identical ( other . discountAmount , discountAmount ) | |
other . discountAmount = = discountAmount ) & &
( identical ( other . totalAmount , totalAmount ) | |
other . totalAmount = = totalAmount ) & &
( identical ( other . totalCost , totalCost ) | |
other . totalCost = = totalCost ) & &
( identical ( other . remainingAmount , remainingAmount ) | |
other . remainingAmount = = remainingAmount ) & &
( identical ( other . paymentStatus , paymentStatus ) | |
other . paymentStatus = = paymentStatus ) & &
( identical ( other . refundAmount , refundAmount ) | |
other . refundAmount = = refundAmount ) & &
( identical ( other . isVoid , isVoid ) | | other . isVoid = = isVoid ) & &
( identical ( other . isRefund , isRefund ) | |
other . isRefund = = isRefund ) & &
( identical ( other . notes , notes ) | | other . notes = = notes ) & &
const DeepCollectionEquality ( ) . equals ( other . _metadata , _metadata ) & &
( identical ( other . createdAt , createdAt ) | |
other . createdAt = = createdAt ) & &
( identical ( other . updatedAt , updatedAt ) | |
other . updatedAt = = updatedAt ) & &
const DeepCollectionEquality ( ) . equals (
other . _orderItems ,
_orderItems ,
) & &
const DeepCollectionEquality ( ) . equals ( other . _payments , _payments ) & &
( identical ( other . totalPaid , totalPaid ) | |
other . totalPaid = = totalPaid ) & &
( identical ( other . paymentCount , paymentCount ) | |
other . paymentCount = = paymentCount ) & &
( identical ( other . splitType , splitType ) | |
other . splitType = = splitType ) ) ;
}
@ override
int get hashCode = > Object . hashAll ( [
runtimeType ,
id ,
orderNumber ,
outletId ,
userId ,
tableNumber ,
orderType ,
status ,
subtotal ,
taxAmount ,
discountAmount ,
totalAmount ,
totalCost ,
remainingAmount ,
paymentStatus ,
refundAmount ,
isVoid ,
isRefund ,
notes ,
const DeepCollectionEquality ( ) . hash ( _metadata ) ,
createdAt ,
updatedAt ,
const DeepCollectionEquality ( ) . hash ( _orderItems ) ,
const DeepCollectionEquality ( ) . hash ( _payments ) ,
totalPaid ,
paymentCount ,
splitType ,
] ) ;
/// Create a copy of Order
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $OrderImplCopyWith < _ $OrderImpl > get copyWith = >
__ $ $OrderImplCopyWithImpl < _ $OrderImpl > ( this , _ $identity ) ;
}
abstract class _Order implements Order {
const factory _Order ( {
required final String id ,
required final String orderNumber ,
required final String outletId ,
required final String userId ,
required final String tableNumber ,
required final String orderType ,
required final String status ,
required final int subtotal ,
required final int taxAmount ,
required final int discountAmount ,
required final int totalAmount ,
required final num totalCost ,
required final int remainingAmount ,
required final String paymentStatus ,
required final int refundAmount ,
required final bool isVoid ,
required final bool isRefund ,
required final String notes ,
required final Map < String , dynamic > metadata ,
required final DateTime createdAt ,
required final DateTime updatedAt ,
required final List < OrderItem > orderItems ,
2025-10-28 00:58:39 +07:00
required final List < Payment > payments ,
2025-10-27 21:55:19 +07:00
required final int totalPaid ,
required final int paymentCount ,
required final String splitType ,
} ) = _ $OrderImpl ;
@ override
String get id ;
@ override
String get orderNumber ;
@ override
String get outletId ;
@ override
String get userId ;
@ override
String get tableNumber ;
@ override
String get orderType ;
@ override
String get status ;
@ override
int get subtotal ;
@ override
int get taxAmount ;
@ override
int get discountAmount ;
@ override
int get totalAmount ;
@ override
num get totalCost ;
@ override
int get remainingAmount ;
@ override
String get paymentStatus ;
@ override
int get refundAmount ;
@ override
bool get isVoid ;
@ override
bool get isRefund ;
@ override
String get notes ;
@ override
Map < String , dynamic > get metadata ;
@ override
DateTime get createdAt ;
@ override
DateTime get updatedAt ;
@ override
List < OrderItem > get orderItems ;
@ override
2025-10-28 00:58:39 +07:00
List < Payment > get payments ;
2025-10-27 21:55:19 +07:00
@ override
int get totalPaid ;
@ override
int get paymentCount ;
@ override
String get splitType ;
/// Create a copy of Order
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $OrderImplCopyWith < _ $OrderImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
mixin _ $OrderItem {
String get id = > throw _privateConstructorUsedError ;
String get orderId = > throw _privateConstructorUsedError ;
String get productId = > throw _privateConstructorUsedError ;
String get productName = > throw _privateConstructorUsedError ;
String get productVariantId = > throw _privateConstructorUsedError ;
String get productVariantName = > throw _privateConstructorUsedError ;
int get quantity = > throw _privateConstructorUsedError ;
int get unitPrice = > throw _privateConstructorUsedError ;
int get totalPrice = > throw _privateConstructorUsedError ;
List < dynamic > get modifiers = > throw _privateConstructorUsedError ;
String get notes = > throw _privateConstructorUsedError ;
String get status = > throw _privateConstructorUsedError ;
DateTime get createdAt = > throw _privateConstructorUsedError ;
DateTime get updatedAt = > throw _privateConstructorUsedError ;
String get printerType = > throw _privateConstructorUsedError ;
int get paidQuantity = > throw _privateConstructorUsedError ;
/// Create a copy of OrderItem
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$OrderItemCopyWith < OrderItem > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $OrderItemCopyWith < $Res > {
factory $OrderItemCopyWith ( OrderItem value , $Res Function ( OrderItem ) then ) =
_ $OrderItemCopyWithImpl < $Res , OrderItem > ;
@ useResult
$Res call ( {
String id ,
String orderId ,
String productId ,
String productName ,
String productVariantId ,
String productVariantName ,
int quantity ,
int unitPrice ,
int totalPrice ,
List < dynamic > modifiers ,
String notes ,
String status ,
DateTime createdAt ,
DateTime updatedAt ,
String printerType ,
int paidQuantity ,
} ) ;
}
/// @nodoc
class _ $OrderItemCopyWithImpl < $Res , $Val extends OrderItem >
implements $OrderItemCopyWith < $Res > {
_ $OrderItemCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of OrderItem
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? id = null ,
Object ? orderId = null ,
Object ? productId = null ,
Object ? productName = null ,
Object ? productVariantId = null ,
Object ? productVariantName = null ,
Object ? quantity = null ,
Object ? unitPrice = null ,
Object ? totalPrice = null ,
Object ? modifiers = null ,
Object ? notes = null ,
Object ? status = null ,
Object ? createdAt = null ,
Object ? updatedAt = null ,
Object ? printerType = null ,
Object ? paidQuantity = null ,
} ) {
return _then (
_value . copyWith (
id: null = = id
? _value . id
: id // ignore: cast_nullable_to_non_nullable
as String ,
orderId: null = = orderId
? _value . orderId
: orderId // ignore: cast_nullable_to_non_nullable
as String ,
productId: null = = productId
? _value . productId
: productId // ignore: cast_nullable_to_non_nullable
as String ,
productName: null = = productName
? _value . productName
: productName // ignore: cast_nullable_to_non_nullable
as String ,
productVariantId: null = = productVariantId
? _value . productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
as String ,
productVariantName: null = = productVariantName
? _value . productVariantName
: productVariantName // ignore: cast_nullable_to_non_nullable
as String ,
quantity: null = = quantity
? _value . quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int ,
unitPrice: null = = unitPrice
? _value . unitPrice
: unitPrice // ignore: cast_nullable_to_non_nullable
as int ,
totalPrice: null = = totalPrice
? _value . totalPrice
: totalPrice // ignore: cast_nullable_to_non_nullable
as int ,
modifiers: null = = modifiers
? _value . modifiers
: modifiers // ignore: cast_nullable_to_non_nullable
as List < dynamic > ,
notes: null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
as String ,
status: null = = status
? _value . status
: status // ignore: cast_nullable_to_non_nullable
as String ,
createdAt: null = = createdAt
? _value . createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
updatedAt: null = = updatedAt
? _value . updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
printerType: null = = printerType
? _value . printerType
: printerType // ignore: cast_nullable_to_non_nullable
as String ,
paidQuantity: null = = paidQuantity
? _value . paidQuantity
: paidQuantity // ignore: cast_nullable_to_non_nullable
as int ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $OrderItemImplCopyWith < $Res >
implements $OrderItemCopyWith < $Res > {
factory _ $ $OrderItemImplCopyWith (
_ $OrderItemImpl value ,
$Res Function ( _ $OrderItemImpl ) then ,
) = __ $ $OrderItemImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
String id ,
String orderId ,
String productId ,
String productName ,
String productVariantId ,
String productVariantName ,
int quantity ,
int unitPrice ,
int totalPrice ,
List < dynamic > modifiers ,
String notes ,
String status ,
DateTime createdAt ,
DateTime updatedAt ,
String printerType ,
int paidQuantity ,
} ) ;
}
/// @nodoc
class __ $ $OrderItemImplCopyWithImpl < $Res >
extends _ $OrderItemCopyWithImpl < $Res , _ $OrderItemImpl >
implements _ $ $OrderItemImplCopyWith < $Res > {
__ $ $OrderItemImplCopyWithImpl (
_ $OrderItemImpl _value ,
$Res Function ( _ $OrderItemImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of OrderItem
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? id = null ,
Object ? orderId = null ,
Object ? productId = null ,
Object ? productName = null ,
Object ? productVariantId = null ,
Object ? productVariantName = null ,
Object ? quantity = null ,
Object ? unitPrice = null ,
Object ? totalPrice = null ,
Object ? modifiers = null ,
Object ? notes = null ,
Object ? status = null ,
Object ? createdAt = null ,
Object ? updatedAt = null ,
Object ? printerType = null ,
Object ? paidQuantity = null ,
} ) {
return _then (
_ $OrderItemImpl (
id: null = = id
? _value . id
: id // ignore: cast_nullable_to_non_nullable
as String ,
orderId: null = = orderId
? _value . orderId
: orderId // ignore: cast_nullable_to_non_nullable
as String ,
productId: null = = productId
? _value . productId
: productId // ignore: cast_nullable_to_non_nullable
as String ,
productName: null = = productName
? _value . productName
: productName // ignore: cast_nullable_to_non_nullable
as String ,
productVariantId: null = = productVariantId
? _value . productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
as String ,
productVariantName: null = = productVariantName
? _value . productVariantName
: productVariantName // ignore: cast_nullable_to_non_nullable
as String ,
quantity: null = = quantity
? _value . quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int ,
unitPrice: null = = unitPrice
? _value . unitPrice
: unitPrice // ignore: cast_nullable_to_non_nullable
as int ,
totalPrice: null = = totalPrice
? _value . totalPrice
: totalPrice // ignore: cast_nullable_to_non_nullable
as int ,
modifiers: null = = modifiers
? _value . _modifiers
: modifiers // ignore: cast_nullable_to_non_nullable
as List < dynamic > ,
notes: null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
as String ,
status: null = = status
? _value . status
: status // ignore: cast_nullable_to_non_nullable
as String ,
createdAt: null = = createdAt
? _value . createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
updatedAt: null = = updatedAt
? _value . updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
printerType: null = = printerType
? _value . printerType
: printerType // ignore: cast_nullable_to_non_nullable
as String ,
paidQuantity: null = = paidQuantity
? _value . paidQuantity
: paidQuantity // ignore: cast_nullable_to_non_nullable
as int ,
) ,
) ;
}
}
/// @nodoc
class _ $OrderItemImpl implements _OrderItem {
const _ $OrderItemImpl ( {
required this . id ,
required this . orderId ,
required this . productId ,
required this . productName ,
required this . productVariantId ,
required this . productVariantName ,
required this . quantity ,
required this . unitPrice ,
required this . totalPrice ,
required final List < dynamic > modifiers ,
required this . notes ,
required this . status ,
required this . createdAt ,
required this . updatedAt ,
required this . printerType ,
required this . paidQuantity ,
} ) : _modifiers = modifiers ;
@ override
final String id ;
@ override
final String orderId ;
@ override
final String productId ;
@ override
final String productName ;
@ override
final String productVariantId ;
@ override
final String productVariantName ;
@ override
final int quantity ;
@ override
final int unitPrice ;
@ override
final int totalPrice ;
final List < dynamic > _modifiers ;
@ override
List < dynamic > get modifiers {
if ( _modifiers is EqualUnmodifiableListView ) return _modifiers ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _modifiers ) ;
}
@ override
final String notes ;
@ override
final String status ;
@ override
final DateTime createdAt ;
@ override
final DateTime updatedAt ;
@ override
final String printerType ;
@ override
final int paidQuantity ;
@ override
String toString ( ) {
return ' OrderItem(id: $ id , orderId: $ orderId , productId: $ productId , productName: $ productName , productVariantId: $ productVariantId , productVariantName: $ productVariantName , quantity: $ quantity , unitPrice: $ unitPrice , totalPrice: $ totalPrice , modifiers: $ modifiers , notes: $ notes , status: $ status , createdAt: $ createdAt , updatedAt: $ updatedAt , printerType: $ printerType , paidQuantity: $ paidQuantity ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $OrderItemImpl & &
( identical ( other . id , id ) | | other . id = = id ) & &
( identical ( other . orderId , orderId ) | | other . orderId = = orderId ) & &
( identical ( other . productId , productId ) | |
other . productId = = productId ) & &
( identical ( other . productName , productName ) | |
other . productName = = productName ) & &
( identical ( other . productVariantId , productVariantId ) | |
other . productVariantId = = productVariantId ) & &
( identical ( other . productVariantName , productVariantName ) | |
other . productVariantName = = productVariantName ) & &
( identical ( other . quantity , quantity ) | |
other . quantity = = quantity ) & &
( identical ( other . unitPrice , unitPrice ) | |
other . unitPrice = = unitPrice ) & &
( identical ( other . totalPrice , totalPrice ) | |
other . totalPrice = = totalPrice ) & &
const DeepCollectionEquality ( ) . equals (
other . _modifiers ,
_modifiers ,
) & &
( identical ( other . notes , notes ) | | other . notes = = notes ) & &
( identical ( other . status , status ) | | other . status = = status ) & &
( identical ( other . createdAt , createdAt ) | |
other . createdAt = = createdAt ) & &
( identical ( other . updatedAt , updatedAt ) | |
other . updatedAt = = updatedAt ) & &
( identical ( other . printerType , printerType ) | |
other . printerType = = printerType ) & &
( identical ( other . paidQuantity , paidQuantity ) | |
other . paidQuantity = = paidQuantity ) ) ;
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
id ,
orderId ,
productId ,
productName ,
productVariantId ,
productVariantName ,
quantity ,
unitPrice ,
totalPrice ,
const DeepCollectionEquality ( ) . hash ( _modifiers ) ,
notes ,
status ,
createdAt ,
updatedAt ,
printerType ,
paidQuantity ,
) ;
/// Create a copy of OrderItem
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $OrderItemImplCopyWith < _ $OrderItemImpl > get copyWith = >
__ $ $OrderItemImplCopyWithImpl < _ $OrderItemImpl > ( this , _ $identity ) ;
}
abstract class _OrderItem implements OrderItem {
const factory _OrderItem ( {
required final String id ,
required final String orderId ,
required final String productId ,
required final String productName ,
required final String productVariantId ,
required final String productVariantName ,
required final int quantity ,
required final int unitPrice ,
required final int totalPrice ,
required final List < dynamic > modifiers ,
required final String notes ,
required final String status ,
required final DateTime createdAt ,
required final DateTime updatedAt ,
required final String printerType ,
required final int paidQuantity ,
} ) = _ $OrderItemImpl ;
@ override
String get id ;
@ override
String get orderId ;
@ override
String get productId ;
@ override
String get productName ;
@ override
String get productVariantId ;
@ override
String get productVariantName ;
@ override
int get quantity ;
@ override
int get unitPrice ;
@ override
int get totalPrice ;
@ override
List < dynamic > get modifiers ;
@ override
String get notes ;
@ override
String get status ;
@ override
DateTime get createdAt ;
@ override
DateTime get updatedAt ;
@ override
String get printerType ;
@ override
int get paidQuantity ;
/// Create a copy of OrderItem
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $OrderItemImplCopyWith < _ $OrderItemImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
mixin _ $OrderRequest {
String get outletId = > throw _privateConstructorUsedError ;
String get customerId = > throw _privateConstructorUsedError ;
String get tableNumber = > throw _privateConstructorUsedError ;
String get tableId = > throw _privateConstructorUsedError ;
String get orderType = > throw _privateConstructorUsedError ;
String get notes = > throw _privateConstructorUsedError ;
List < OrderItemRequest > get orderItems = > throw _privateConstructorUsedError ;
String get customerName = > throw _privateConstructorUsedError ;
2025-10-27 21:55:19 +07:00
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequest
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-10-28 00:58:39 +07:00
$OrderRequestCopyWith < OrderRequest > get copyWith = >
2025-10-27 21:55:19 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class $OrderRequestCopyWith < $Res > {
factory $OrderRequestCopyWith (
OrderRequest value ,
$Res Function ( OrderRequest ) then ,
) = _ $OrderRequestCopyWithImpl < $Res , OrderRequest > ;
2025-10-27 21:55:19 +07:00
@ useResult
$Res call ( {
2025-10-28 00:58:39 +07:00
String outletId ,
String customerId ,
String tableNumber ,
String tableId ,
String orderType ,
String notes ,
List < OrderItemRequest > orderItems ,
String customerName ,
2025-10-27 21:55:19 +07:00
} ) ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _ $OrderRequestCopyWithImpl < $Res , $Val extends OrderRequest >
implements $OrderRequestCopyWith < $Res > {
_ $OrderRequestCopyWithImpl ( this . _value , this . _then ) ;
2025-10-27 21:55:19 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequest
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-10-28 00:58:39 +07:00
Object ? outletId = null ,
Object ? customerId = null ,
Object ? tableNumber = null ,
Object ? tableId = null ,
Object ? orderType = null ,
Object ? notes = null ,
Object ? orderItems = null ,
Object ? customerName = null ,
2025-10-27 21:55:19 +07:00
} ) {
return _then (
_value . copyWith (
2025-10-28 00:58:39 +07:00
outletId: null = = outletId
? _value . outletId
: outletId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
customerId: null = = customerId
? _value . customerId
: customerId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
tableNumber: null = = tableNumber
? _value . tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
tableId: null = = tableId
? _value . tableId
: tableId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
orderType: null = = orderType
? _value . orderType
: orderType // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
notes: null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
orderItems: null = = orderItems
? _value . orderItems
: orderItems // ignore: cast_nullable_to_non_nullable
as List < OrderItemRequest > ,
customerName: null = = customerName
? _value . customerName
: customerName // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
)
as $Val ,
) ;
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class _ $ $OrderRequestImplCopyWith < $Res >
implements $OrderRequestCopyWith < $Res > {
factory _ $ $OrderRequestImplCopyWith (
_ $OrderRequestImpl value ,
$Res Function ( _ $OrderRequestImpl ) then ,
) = __ $ $OrderRequestImplCopyWithImpl < $Res > ;
2025-10-27 21:55:19 +07:00
@ override
@ useResult
$Res call ( {
2025-10-28 00:58:39 +07:00
String outletId ,
String customerId ,
String tableNumber ,
String tableId ,
String orderType ,
String notes ,
List < OrderItemRequest > orderItems ,
String customerName ,
2025-10-27 21:55:19 +07:00
} ) ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class __ $ $OrderRequestImplCopyWithImpl < $Res >
extends _ $OrderRequestCopyWithImpl < $Res , _ $OrderRequestImpl >
implements _ $ $OrderRequestImplCopyWith < $Res > {
__ $ $OrderRequestImplCopyWithImpl (
_ $OrderRequestImpl _value ,
$Res Function ( _ $OrderRequestImpl ) _then ,
2025-10-27 21:55:19 +07:00
) : super ( _value , _then ) ;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequest
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-10-28 00:58:39 +07:00
Object ? outletId = null ,
Object ? customerId = null ,
Object ? tableNumber = null ,
Object ? tableId = null ,
Object ? orderType = null ,
Object ? notes = null ,
Object ? orderItems = null ,
Object ? customerName = null ,
2025-10-27 21:55:19 +07:00
} ) {
return _then (
2025-10-28 00:58:39 +07:00
_ $OrderRequestImpl (
outletId: null = = outletId
? _value . outletId
: outletId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
customerId: null = = customerId
? _value . customerId
: customerId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
tableNumber: null = = tableNumber
? _value . tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
tableId: null = = tableId
? _value . tableId
: tableId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
orderType: null = = orderType
? _value . orderType
: orderType // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
notes: null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
2025-10-28 00:58:39 +07:00
orderItems: null = = orderItems
? _value . _orderItems
: orderItems // ignore: cast_nullable_to_non_nullable
as List < OrderItemRequest > ,
customerName: null = = customerName
? _value . customerName
: customerName // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String ,
) ,
) ;
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _ $OrderRequestImpl implements _OrderRequest {
const _ $OrderRequestImpl ( {
required this . outletId ,
required this . customerId ,
required this . tableNumber ,
required this . tableId ,
required this . orderType ,
required this . notes ,
required final List < OrderItemRequest > orderItems ,
required this . customerName ,
} ) : _orderItems = orderItems ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String outletId ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String customerId ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String tableNumber ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String tableId ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String orderType ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String notes ;
final List < OrderItemRequest > _orderItems ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
List < OrderItemRequest > get orderItems {
if ( _orderItems is EqualUnmodifiableListView ) return _orderItems ;
2025-10-27 21:55:19 +07:00
// ignore: implicit_dynamic_type
2025-10-28 00:58:39 +07:00
return EqualUnmodifiableListView ( _orderItems ) ;
2025-10-27 21:55:19 +07:00
}
@ override
2025-10-28 00:58:39 +07:00
final String customerName ;
2025-10-27 21:55:19 +07:00
@ override
String toString ( ) {
2025-10-28 00:58:39 +07:00
return ' OrderRequest(outletId: $ outletId , customerId: $ customerId , tableNumber: $ tableNumber , tableId: $ tableId , orderType: $ orderType , notes: $ notes , orderItems: $ orderItems , customerName: $ customerName ) ' ;
2025-10-27 21:55:19 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
2025-10-28 00:58:39 +07:00
other is _ $OrderRequestImpl & &
( identical ( other . outletId , outletId ) | |
other . outletId = = outletId ) & &
( identical ( other . customerId , customerId ) | |
other . customerId = = customerId ) & &
( identical ( other . tableNumber , tableNumber ) | |
other . tableNumber = = tableNumber ) & &
( identical ( other . tableId , tableId ) | | other . tableId = = tableId ) & &
( identical ( other . orderType , orderType ) | |
other . orderType = = orderType ) & &
( identical ( other . notes , notes ) | | other . notes = = notes ) & &
const DeepCollectionEquality ( ) . equals (
other . _orderItems ,
_orderItems ,
) & &
( identical ( other . customerName , customerName ) | |
other . customerName = = customerName ) ) ;
2025-10-27 21:55:19 +07:00
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
2025-10-28 00:58:39 +07:00
outletId ,
customerId ,
tableNumber ,
tableId ,
orderType ,
notes ,
const DeepCollectionEquality ( ) . hash ( _orderItems ) ,
customerName ,
2025-10-27 21:55:19 +07:00
) ;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequest
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
2025-10-28 00:58:39 +07:00
_ $ $OrderRequestImplCopyWith < _ $OrderRequestImpl > get copyWith = >
__ $ $OrderRequestImplCopyWithImpl < _ $OrderRequestImpl > ( this , _ $identity ) ;
2025-10-27 21:55:19 +07:00
}
2025-10-28 00:58:39 +07:00
abstract class _OrderRequest implements OrderRequest {
const factory _OrderRequest ( {
required final String outletId ,
required final String customerId ,
required final String tableNumber ,
required final String tableId ,
required final String orderType ,
required final String notes ,
required final List < OrderItemRequest > orderItems ,
required final String customerName ,
} ) = _ $OrderRequestImpl ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get outletId ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get customerId ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get tableNumber ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get tableId ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get orderType ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get notes ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
List < OrderItemRequest > get orderItems ;
2025-10-27 21:55:19 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get customerName ;
2025-10-27 21:55:19 +07:00
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequest
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-10-28 00:58:39 +07:00
_ $ $OrderRequestImplCopyWith < _ $OrderRequestImpl > get copyWith = >
2025-10-27 21:55:19 +07:00
throw _privateConstructorUsedError ;
2025-10-28 00:08:12 +07:00
}
/// @nodoc
2025-10-28 00:58:39 +07:00
mixin _ $OrderItemRequest {
String get productId = > throw _privateConstructorUsedError ;
String get productVariantId = > throw _privateConstructorUsedError ;
int get quantity = > throw _privateConstructorUsedError ;
int get unitPrice = > throw _privateConstructorUsedError ;
2025-10-28 00:08:12 +07:00
String get notes = > throw _privateConstructorUsedError ;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-10-28 00:58:39 +07:00
$OrderItemRequestCopyWith < OrderItemRequest > get copyWith = >
2025-10-28 00:08:12 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class $OrderItemRequestCopyWith < $Res > {
factory $OrderItemRequestCopyWith (
OrderItemRequest value ,
$Res Function ( OrderItemRequest ) then ,
) = _ $OrderItemRequestCopyWithImpl < $Res , OrderItemRequest > ;
2025-10-28 00:08:12 +07:00
@ useResult
$Res call ( {
2025-10-28 00:58:39 +07:00
String productId ,
String productVariantId ,
int quantity ,
int unitPrice ,
2025-10-28 00:08:12 +07:00
String notes ,
} ) ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _ $OrderItemRequestCopyWithImpl < $Res , $Val extends OrderItemRequest >
implements $OrderItemRequestCopyWith < $Res > {
_ $OrderItemRequestCopyWithImpl ( this . _value , this . _then ) ;
2025-10-28 00:08:12 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-10-28 00:58:39 +07:00
Object ? productId = null ,
Object ? productVariantId = null ,
Object ? quantity = null ,
Object ? unitPrice = null ,
2025-10-28 00:08:12 +07:00
Object ? notes = null ,
} ) {
return _then (
_value . copyWith (
2025-10-28 00:58:39 +07:00
productId: null = = productId
? _value . productId
: productId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
productVariantId: null = = productVariantId
? _value . productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
quantity: null = = quantity
? _value . quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int ,
unitPrice: null = = unitPrice
? _value . unitPrice
: unitPrice // ignore: cast_nullable_to_non_nullable
as int ,
2025-10-28 00:08:12 +07:00
notes: null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
as String ,
)
as $Val ,
) ;
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class _ $ $OrderItemRequestImplCopyWith < $Res >
implements $OrderItemRequestCopyWith < $Res > {
factory _ $ $OrderItemRequestImplCopyWith (
_ $OrderItemRequestImpl value ,
$Res Function ( _ $OrderItemRequestImpl ) then ,
) = __ $ $OrderItemRequestImplCopyWithImpl < $Res > ;
2025-10-28 00:08:12 +07:00
@ override
@ useResult
$Res call ( {
2025-10-28 00:58:39 +07:00
String productId ,
String productVariantId ,
int quantity ,
int unitPrice ,
2025-10-28 00:08:12 +07:00
String notes ,
} ) ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class __ $ $OrderItemRequestImplCopyWithImpl < $Res >
extends _ $OrderItemRequestCopyWithImpl < $Res , _ $OrderItemRequestImpl >
implements _ $ $OrderItemRequestImplCopyWith < $Res > {
__ $ $OrderItemRequestImplCopyWithImpl (
_ $OrderItemRequestImpl _value ,
$Res Function ( _ $OrderItemRequestImpl ) _then ,
2025-10-28 00:08:12 +07:00
) : super ( _value , _then ) ;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-10-28 00:58:39 +07:00
Object ? productId = null ,
Object ? productVariantId = null ,
Object ? quantity = null ,
Object ? unitPrice = null ,
2025-10-28 00:08:12 +07:00
Object ? notes = null ,
} ) {
return _then (
2025-10-28 00:58:39 +07:00
_ $OrderItemRequestImpl (
productId: null = = productId
? _value . productId
: productId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
productVariantId: null = = productVariantId
? _value . productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
quantity: null = = quantity
? _value . quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int ,
unitPrice: null = = unitPrice
? _value . unitPrice
: unitPrice // ignore: cast_nullable_to_non_nullable
as int ,
2025-10-28 00:08:12 +07:00
notes: null = = notes
? _value . notes
: notes // ignore: cast_nullable_to_non_nullable
as String ,
) ,
) ;
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _ $OrderItemRequestImpl implements _OrderItemRequest {
const _ $OrderItemRequestImpl ( {
required this . productId ,
required this . productVariantId ,
required this . quantity ,
required this . unitPrice ,
2025-10-28 00:08:12 +07:00
required this . notes ,
2025-10-28 00:58:39 +07:00
} ) ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String productId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String productVariantId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final int quantity ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final int unitPrice ;
2025-10-28 00:08:12 +07:00
@ override
final String notes ;
@ override
String toString ( ) {
2025-10-28 00:58:39 +07:00
return ' OrderItemRequest(productId: $ productId , productVariantId: $ productVariantId , quantity: $ quantity , unitPrice: $ unitPrice , notes: $ notes ) ' ;
2025-10-28 00:08:12 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
2025-10-28 00:58:39 +07:00
other is _ $OrderItemRequestImpl & &
( identical ( other . productId , productId ) | |
other . productId = = productId ) & &
( identical ( other . productVariantId , productVariantId ) | |
other . productVariantId = = productVariantId ) & &
( identical ( other . quantity , quantity ) | |
other . quantity = = quantity ) & &
( identical ( other . unitPrice , unitPrice ) | |
other . unitPrice = = unitPrice ) & &
( identical ( other . notes , notes ) | | other . notes = = notes ) ) ;
2025-10-28 00:08:12 +07:00
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
2025-10-28 00:58:39 +07:00
productId ,
productVariantId ,
quantity ,
unitPrice ,
2025-10-28 00:08:12 +07:00
notes ,
) ;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
2025-10-28 00:58:39 +07:00
_ $ $OrderItemRequestImplCopyWith < _ $OrderItemRequestImpl > get copyWith = >
__ $ $OrderItemRequestImplCopyWithImpl < _ $OrderItemRequestImpl > (
this ,
_ $identity ,
) ;
2025-10-28 00:08:12 +07:00
}
2025-10-28 00:58:39 +07:00
abstract class _OrderItemRequest implements OrderItemRequest {
const factory _OrderItemRequest ( {
required final String productId ,
required final String productVariantId ,
required final int quantity ,
required final int unitPrice ,
2025-10-28 00:08:12 +07:00
required final String notes ,
2025-10-28 00:58:39 +07:00
} ) = _ $OrderItemRequestImpl ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get productId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get productVariantId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
int get quantity ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
int get unitPrice ;
2025-10-28 00:08:12 +07:00
@ override
String get notes ;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequest
/// with the given fields replaced by the non-null parameter values.
2025-10-28 00:08:12 +07:00
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-10-28 00:58:39 +07:00
_ $ $OrderItemRequestImplCopyWith < _ $OrderItemRequestImpl > get copyWith = >
2025-10-28 00:08:12 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
mixin _ $PaymentRequest {
String get orderId = > throw _privateConstructorUsedError ;
String get paymentMethodId = > throw _privateConstructorUsedError ;
int get amount = > throw _privateConstructorUsedError ;
String get transactionId = > throw _privateConstructorUsedError ;
int get splitNumber = > throw _privateConstructorUsedError ;
int get splitTotal = > throw _privateConstructorUsedError ;
String get splitDescription = > throw _privateConstructorUsedError ;
List < PaymentItemRequest > get paymentOrderItems = >
throw _privateConstructorUsedError ;
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-10-28 00:58:39 +07:00
$PaymentRequestCopyWith < PaymentRequest > get copyWith = >
2025-10-28 00:08:12 +07:00
throw _privateConstructorUsedError ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class $PaymentRequestCopyWith < $Res > {
factory $PaymentRequestCopyWith (
PaymentRequest value ,
$Res Function ( PaymentRequest ) then ,
) = _ $PaymentRequestCopyWithImpl < $Res , PaymentRequest > ;
2025-10-28 00:08:12 +07:00
@ useResult
$Res call ( {
2025-10-28 00:58:39 +07:00
String orderId ,
String paymentMethodId ,
int amount ,
String transactionId ,
int splitNumber ,
int splitTotal ,
String splitDescription ,
List < PaymentItemRequest > paymentOrderItems ,
2025-10-28 00:08:12 +07:00
} ) ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _ $PaymentRequestCopyWithImpl < $Res , $Val extends PaymentRequest >
implements $PaymentRequestCopyWith < $Res > {
_ $PaymentRequestCopyWithImpl ( this . _value , this . _then ) ;
2025-10-28 00:08:12 +07:00
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-10-28 00:58:39 +07:00
Object ? orderId = null ,
Object ? paymentMethodId = null ,
Object ? amount = null ,
Object ? transactionId = null ,
Object ? splitNumber = null ,
Object ? splitTotal = null ,
Object ? splitDescription = null ,
Object ? paymentOrderItems = null ,
2025-10-28 00:08:12 +07:00
} ) {
return _then (
_value . copyWith (
2025-10-28 00:58:39 +07:00
orderId: null = = orderId
? _value . orderId
: orderId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
paymentMethodId: null = = paymentMethodId
? _value . paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
amount: null = = amount
? _value . amount
: amount // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as int ,
2025-10-28 00:58:39 +07:00
transactionId: null = = transactionId
? _value . transactionId
: transactionId // ignore: cast_nullable_to_non_nullable
as String ,
splitNumber: null = = splitNumber
? _value . splitNumber
: splitNumber // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as int ,
2025-10-28 00:58:39 +07:00
splitTotal: null = = splitTotal
? _value . splitTotal
: splitTotal // ignore: cast_nullable_to_non_nullable
as int ,
splitDescription: null = = splitDescription
? _value . splitDescription
: splitDescription // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
paymentOrderItems: null = = paymentOrderItems
? _value . paymentOrderItems
: paymentOrderItems // ignore: cast_nullable_to_non_nullable
as List < PaymentItemRequest > ,
2025-10-28 00:08:12 +07:00
)
as $Val ,
) ;
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class _ $ $PaymentRequestImplCopyWith < $Res >
implements $PaymentRequestCopyWith < $Res > {
factory _ $ $PaymentRequestImplCopyWith (
_ $PaymentRequestImpl value ,
$Res Function ( _ $PaymentRequestImpl ) then ,
) = __ $ $PaymentRequestImplCopyWithImpl < $Res > ;
2025-10-28 00:08:12 +07:00
@ override
@ useResult
$Res call ( {
2025-10-28 00:58:39 +07:00
String orderId ,
String paymentMethodId ,
int amount ,
String transactionId ,
int splitNumber ,
int splitTotal ,
String splitDescription ,
List < PaymentItemRequest > paymentOrderItems ,
2025-10-28 00:08:12 +07:00
} ) ;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class __ $ $PaymentRequestImplCopyWithImpl < $Res >
extends _ $PaymentRequestCopyWithImpl < $Res , _ $PaymentRequestImpl >
implements _ $ $PaymentRequestImplCopyWith < $Res > {
__ $ $PaymentRequestImplCopyWithImpl (
_ $PaymentRequestImpl _value ,
$Res Function ( _ $PaymentRequestImpl ) _then ,
2025-10-28 00:08:12 +07:00
) : super ( _value , _then ) ;
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
2025-10-28 00:58:39 +07:00
Object ? orderId = null ,
Object ? paymentMethodId = null ,
Object ? amount = null ,
Object ? transactionId = null ,
Object ? splitNumber = null ,
Object ? splitTotal = null ,
Object ? splitDescription = null ,
Object ? paymentOrderItems = null ,
2025-10-28 00:08:12 +07:00
} ) {
return _then (
2025-10-28 00:58:39 +07:00
_ $PaymentRequestImpl (
orderId: null = = orderId
? _value . orderId
: orderId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
paymentMethodId: null = = paymentMethodId
? _value . paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
amount: null = = amount
? _value . amount
: amount // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as int ,
2025-10-28 00:58:39 +07:00
transactionId: null = = transactionId
? _value . transactionId
: transactionId // ignore: cast_nullable_to_non_nullable
as String ,
splitNumber: null = = splitNumber
? _value . splitNumber
: splitNumber // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as int ,
2025-10-28 00:58:39 +07:00
splitTotal: null = = splitTotal
? _value . splitTotal
: splitTotal // ignore: cast_nullable_to_non_nullable
as int ,
splitDescription: null = = splitDescription
? _value . splitDescription
: splitDescription // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String ,
2025-10-28 00:58:39 +07:00
paymentOrderItems: null = = paymentOrderItems
? _value . _paymentOrderItems
: paymentOrderItems // ignore: cast_nullable_to_non_nullable
as List < PaymentItemRequest > ,
2025-10-28 00:08:12 +07:00
) ,
) ;
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _ $PaymentRequestImpl implements _PaymentRequest {
const _ $PaymentRequestImpl ( {
required this . orderId ,
required this . paymentMethodId ,
required this . amount ,
required this . transactionId ,
required this . splitNumber ,
required this . splitTotal ,
required this . splitDescription ,
required final List < PaymentItemRequest > paymentOrderItems ,
} ) : _paymentOrderItems = paymentOrderItems ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String orderId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String paymentMethodId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final int amount ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final String transactionId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
final int splitNumber ;
@ override
final int splitTotal ;
@ override
final String splitDescription ;
final List < PaymentItemRequest > _paymentOrderItems ;
@ override
List < PaymentItemRequest > get paymentOrderItems {
if ( _paymentOrderItems is EqualUnmodifiableListView )
return _paymentOrderItems ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _paymentOrderItems ) ;
}
2025-10-28 00:08:12 +07:00
@ override
String toString ( ) {
2025-10-28 00:58:39 +07:00
return ' PaymentRequest(orderId: $ orderId , paymentMethodId: $ paymentMethodId , amount: $ amount , transactionId: $ transactionId , splitNumber: $ splitNumber , splitTotal: $ splitTotal , splitDescription: $ splitDescription , paymentOrderItems: $ paymentOrderItems ) ' ;
2025-10-28 00:08:12 +07:00
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
2025-10-28 00:58:39 +07:00
other is _ $PaymentRequestImpl & &
( identical ( other . orderId , orderId ) | | other . orderId = = orderId ) & &
( identical ( other . paymentMethodId , paymentMethodId ) | |
other . paymentMethodId = = paymentMethodId ) & &
( identical ( other . amount , amount ) | | other . amount = = amount ) & &
( identical ( other . transactionId , transactionId ) | |
other . transactionId = = transactionId ) & &
( identical ( other . splitNumber , splitNumber ) | |
other . splitNumber = = splitNumber ) & &
( identical ( other . splitTotal , splitTotal ) | |
other . splitTotal = = splitTotal ) & &
( identical ( other . splitDescription , splitDescription ) | |
other . splitDescription = = splitDescription ) & &
const DeepCollectionEquality ( ) . equals (
other . _paymentOrderItems ,
_paymentOrderItems ,
) ) ;
2025-10-28 00:08:12 +07:00
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
2025-10-28 00:58:39 +07:00
orderId ,
paymentMethodId ,
amount ,
transactionId ,
splitNumber ,
splitTotal ,
splitDescription ,
const DeepCollectionEquality ( ) . hash ( _paymentOrderItems ) ,
2025-10-28 00:08:12 +07:00
) ;
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
2025-10-28 00:58:39 +07:00
_ $ $PaymentRequestImplCopyWith < _ $PaymentRequestImpl > get copyWith = >
__ $ $PaymentRequestImplCopyWithImpl < _ $PaymentRequestImpl > (
2025-10-28 00:08:12 +07:00
this ,
_ $identity ,
) ;
}
2025-10-28 00:58:39 +07:00
abstract class _PaymentRequest implements PaymentRequest {
const factory _PaymentRequest ( {
required final String orderId ,
required final String paymentMethodId ,
required final int amount ,
required final String transactionId ,
required final int splitNumber ,
required final int splitTotal ,
required final String splitDescription ,
required final List < PaymentItemRequest > paymentOrderItems ,
} ) = _ $PaymentRequestImpl ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get orderId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get paymentMethodId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
int get amount ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
String get transactionId ;
2025-10-28 00:08:12 +07:00
@ override
2025-10-28 00:58:39 +07:00
int get splitNumber ;
@ override
int get splitTotal ;
@ override
String get splitDescription ;
@ override
List < PaymentItemRequest > get paymentOrderItems ;
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequest
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
2025-10-28 00:58:39 +07:00
_ $ $PaymentRequestImplCopyWith < _ $PaymentRequestImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
mixin _ $PaymentItemRequest {
String get orderItemId = > throw _privateConstructorUsedError ;
int get amount = > throw _privateConstructorUsedError ;
/// Create a copy of PaymentItemRequest
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$PaymentItemRequestCopyWith < PaymentItemRequest > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $PaymentItemRequestCopyWith < $Res > {
factory $PaymentItemRequestCopyWith (
PaymentItemRequest value ,
$Res Function ( PaymentItemRequest ) then ,
) = _ $PaymentItemRequestCopyWithImpl < $Res , PaymentItemRequest > ;
@ useResult
$Res call ( { String orderItemId , int amount } ) ;
}
/// @nodoc
class _ $PaymentItemRequestCopyWithImpl < $Res , $Val extends PaymentItemRequest >
implements $PaymentItemRequestCopyWith < $Res > {
_ $PaymentItemRequestCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of PaymentItemRequest
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( { Object ? orderItemId = null , Object ? amount = null } ) {
return _then (
_value . copyWith (
orderItemId: null = = orderItemId
? _value . orderItemId
: orderItemId // ignore: cast_nullable_to_non_nullable
as String ,
amount: null = = amount
? _value . amount
: amount // ignore: cast_nullable_to_non_nullable
as int ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $PaymentItemRequestImplCopyWith < $Res >
implements $PaymentItemRequestCopyWith < $Res > {
factory _ $ $PaymentItemRequestImplCopyWith (
_ $PaymentItemRequestImpl value ,
$Res Function ( _ $PaymentItemRequestImpl ) then ,
) = __ $ $PaymentItemRequestImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( { String orderItemId , int amount } ) ;
}
/// @nodoc
class __ $ $PaymentItemRequestImplCopyWithImpl < $Res >
extends _ $PaymentItemRequestCopyWithImpl < $Res , _ $PaymentItemRequestImpl >
implements _ $ $PaymentItemRequestImplCopyWith < $Res > {
__ $ $PaymentItemRequestImplCopyWithImpl (
_ $PaymentItemRequestImpl _value ,
$Res Function ( _ $PaymentItemRequestImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of PaymentItemRequest
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( { Object ? orderItemId = null , Object ? amount = null } ) {
return _then (
_ $PaymentItemRequestImpl (
orderItemId: null = = orderItemId
? _value . orderItemId
: orderItemId // ignore: cast_nullable_to_non_nullable
as String ,
amount: null = = amount
? _value . amount
: amount // ignore: cast_nullable_to_non_nullable
as int ,
) ,
) ;
}
}
/// @nodoc
class _ $PaymentItemRequestImpl implements _PaymentItemRequest {
const _ $PaymentItemRequestImpl ( {
required this . orderItemId ,
required this . amount ,
} ) ;
@ override
final String orderItemId ;
@ override
final int amount ;
@ override
String toString ( ) {
return ' PaymentItemRequest(orderItemId: $ orderItemId , amount: $ amount ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $PaymentItemRequestImpl & &
( identical ( other . orderItemId , orderItemId ) | |
other . orderItemId = = orderItemId ) & &
( identical ( other . amount , amount ) | | other . amount = = amount ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , orderItemId , amount ) ;
/// Create a copy of PaymentItemRequest
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $PaymentItemRequestImplCopyWith < _ $PaymentItemRequestImpl > get copyWith = >
__ $ $PaymentItemRequestImplCopyWithImpl < _ $PaymentItemRequestImpl > (
this ,
_ $identity ,
) ;
}
abstract class _PaymentItemRequest implements PaymentItemRequest {
const factory _PaymentItemRequest ( {
required final String orderItemId ,
required final int amount ,
} ) = _ $PaymentItemRequestImpl ;
@ override
String get orderItemId ;
@ override
int get amount ;
/// Create a copy of PaymentItemRequest
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $PaymentItemRequestImplCopyWith < _ $PaymentItemRequestImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
mixin _ $Payment {
String get id = > throw _privateConstructorUsedError ;
String get orderId = > throw _privateConstructorUsedError ;
String get paymentMethodId = > throw _privateConstructorUsedError ;
String get paymentMethodName = > throw _privateConstructorUsedError ;
String get paymentMethodType = > throw _privateConstructorUsedError ;
int get amount = > throw _privateConstructorUsedError ;
String get status = > throw _privateConstructorUsedError ;
int get splitNumber = > throw _privateConstructorUsedError ;
int get splitTotal = > throw _privateConstructorUsedError ;
String get splitDescription = > throw _privateConstructorUsedError ;
int get refundAmount = > throw _privateConstructorUsedError ;
Map < String , dynamic > get metadata = > throw _privateConstructorUsedError ;
DateTime get createdAt = > throw _privateConstructorUsedError ;
DateTime get updatedAt = > throw _privateConstructorUsedError ;
/// Create a copy of Payment
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$PaymentCopyWith < Payment > get copyWith = > throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $PaymentCopyWith < $Res > {
factory $PaymentCopyWith ( Payment value , $Res Function ( Payment ) then ) =
_ $PaymentCopyWithImpl < $Res , Payment > ;
@ useResult
$Res call ( {
String id ,
String orderId ,
String paymentMethodId ,
String paymentMethodName ,
String paymentMethodType ,
int amount ,
String status ,
int splitNumber ,
int splitTotal ,
String splitDescription ,
int refundAmount ,
Map < String , dynamic > metadata ,
DateTime createdAt ,
DateTime updatedAt ,
} ) ;
}
/// @nodoc
class _ $PaymentCopyWithImpl < $Res , $Val extends Payment >
implements $PaymentCopyWith < $Res > {
_ $PaymentCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of Payment
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? id = null ,
Object ? orderId = null ,
Object ? paymentMethodId = null ,
Object ? paymentMethodName = null ,
Object ? paymentMethodType = null ,
Object ? amount = null ,
Object ? status = null ,
Object ? splitNumber = null ,
Object ? splitTotal = null ,
Object ? splitDescription = null ,
Object ? refundAmount = null ,
Object ? metadata = null ,
Object ? createdAt = null ,
Object ? updatedAt = null ,
} ) {
return _then (
_value . copyWith (
id: null = = id
? _value . id
: id // ignore: cast_nullable_to_non_nullable
as String ,
orderId: null = = orderId
? _value . orderId
: orderId // ignore: cast_nullable_to_non_nullable
as String ,
paymentMethodId: null = = paymentMethodId
? _value . paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
as String ,
paymentMethodName: null = = paymentMethodName
? _value . paymentMethodName
: paymentMethodName // ignore: cast_nullable_to_non_nullable
as String ,
paymentMethodType: null = = paymentMethodType
? _value . paymentMethodType
: paymentMethodType // ignore: cast_nullable_to_non_nullable
as String ,
amount: null = = amount
? _value . amount
: amount // ignore: cast_nullable_to_non_nullable
as int ,
status: null = = status
? _value . status
: status // ignore: cast_nullable_to_non_nullable
as String ,
splitNumber: null = = splitNumber
? _value . splitNumber
: splitNumber // ignore: cast_nullable_to_non_nullable
as int ,
splitTotal: null = = splitTotal
? _value . splitTotal
: splitTotal // ignore: cast_nullable_to_non_nullable
as int ,
splitDescription: null = = splitDescription
? _value . splitDescription
: splitDescription // ignore: cast_nullable_to_non_nullable
as String ,
refundAmount: null = = refundAmount
? _value . refundAmount
: refundAmount // ignore: cast_nullable_to_non_nullable
as int ,
metadata: null = = metadata
? _value . metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map < String , dynamic > ,
createdAt: null = = createdAt
? _value . createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
updatedAt: null = = updatedAt
? _value . updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $PaymentImplCopyWith < $Res > implements $PaymentCopyWith < $Res > {
factory _ $ $PaymentImplCopyWith (
_ $PaymentImpl value ,
$Res Function ( _ $PaymentImpl ) then ,
) = __ $ $PaymentImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
String id ,
String orderId ,
String paymentMethodId ,
String paymentMethodName ,
String paymentMethodType ,
int amount ,
String status ,
int splitNumber ,
int splitTotal ,
String splitDescription ,
int refundAmount ,
Map < String , dynamic > metadata ,
DateTime createdAt ,
DateTime updatedAt ,
} ) ;
}
/// @nodoc
class __ $ $PaymentImplCopyWithImpl < $Res >
extends _ $PaymentCopyWithImpl < $Res , _ $PaymentImpl >
implements _ $ $PaymentImplCopyWith < $Res > {
__ $ $PaymentImplCopyWithImpl (
_ $PaymentImpl _value ,
$Res Function ( _ $PaymentImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of Payment
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( {
Object ? id = null ,
Object ? orderId = null ,
Object ? paymentMethodId = null ,
Object ? paymentMethodName = null ,
Object ? paymentMethodType = null ,
Object ? amount = null ,
Object ? status = null ,
Object ? splitNumber = null ,
Object ? splitTotal = null ,
Object ? splitDescription = null ,
Object ? refundAmount = null ,
Object ? metadata = null ,
Object ? createdAt = null ,
Object ? updatedAt = null ,
} ) {
return _then (
_ $PaymentImpl (
id: null = = id
? _value . id
: id // ignore: cast_nullable_to_non_nullable
as String ,
orderId: null = = orderId
? _value . orderId
: orderId // ignore: cast_nullable_to_non_nullable
as String ,
paymentMethodId: null = = paymentMethodId
? _value . paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
as String ,
paymentMethodName: null = = paymentMethodName
? _value . paymentMethodName
: paymentMethodName // ignore: cast_nullable_to_non_nullable
as String ,
paymentMethodType: null = = paymentMethodType
? _value . paymentMethodType
: paymentMethodType // ignore: cast_nullable_to_non_nullable
as String ,
amount: null = = amount
? _value . amount
: amount // ignore: cast_nullable_to_non_nullable
as int ,
status: null = = status
? _value . status
: status // ignore: cast_nullable_to_non_nullable
as String ,
splitNumber: null = = splitNumber
? _value . splitNumber
: splitNumber // ignore: cast_nullable_to_non_nullable
as int ,
splitTotal: null = = splitTotal
? _value . splitTotal
: splitTotal // ignore: cast_nullable_to_non_nullable
as int ,
splitDescription: null = = splitDescription
? _value . splitDescription
: splitDescription // ignore: cast_nullable_to_non_nullable
as String ,
refundAmount: null = = refundAmount
? _value . refundAmount
: refundAmount // ignore: cast_nullable_to_non_nullable
as int ,
metadata: null = = metadata
? _value . _metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map < String , dynamic > ,
createdAt: null = = createdAt
? _value . createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
updatedAt: null = = updatedAt
? _value . updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime ,
) ,
) ;
}
}
/// @nodoc
class _ $PaymentImpl implements _Payment {
const _ $PaymentImpl ( {
required this . id ,
required this . orderId ,
required this . paymentMethodId ,
required this . paymentMethodName ,
required this . paymentMethodType ,
required this . amount ,
required this . status ,
required this . splitNumber ,
required this . splitTotal ,
required this . splitDescription ,
required this . refundAmount ,
required final Map < String , dynamic > metadata ,
required this . createdAt ,
required this . updatedAt ,
} ) : _metadata = metadata ;
@ override
final String id ;
@ override
final String orderId ;
@ override
final String paymentMethodId ;
@ override
final String paymentMethodName ;
@ override
final String paymentMethodType ;
@ override
final int amount ;
@ override
final String status ;
@ override
final int splitNumber ;
@ override
final int splitTotal ;
@ override
final String splitDescription ;
@ override
final int refundAmount ;
final Map < String , dynamic > _metadata ;
@ override
Map < String , dynamic > get metadata {
if ( _metadata is EqualUnmodifiableMapView ) return _metadata ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView ( _metadata ) ;
}
@ override
final DateTime createdAt ;
@ override
final DateTime updatedAt ;
@ override
String toString ( ) {
return ' Payment(id: $ id , orderId: $ orderId , paymentMethodId: $ paymentMethodId , paymentMethodName: $ paymentMethodName , paymentMethodType: $ paymentMethodType , amount: $ amount , status: $ status , splitNumber: $ splitNumber , splitTotal: $ splitTotal , splitDescription: $ splitDescription , refundAmount: $ refundAmount , metadata: $ metadata , createdAt: $ createdAt , updatedAt: $ updatedAt ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $PaymentImpl & &
( identical ( other . id , id ) | | other . id = = id ) & &
( identical ( other . orderId , orderId ) | | other . orderId = = orderId ) & &
( identical ( other . paymentMethodId , paymentMethodId ) | |
other . paymentMethodId = = paymentMethodId ) & &
( identical ( other . paymentMethodName , paymentMethodName ) | |
other . paymentMethodName = = paymentMethodName ) & &
( identical ( other . paymentMethodType , paymentMethodType ) | |
other . paymentMethodType = = paymentMethodType ) & &
( identical ( other . amount , amount ) | | other . amount = = amount ) & &
( identical ( other . status , status ) | | other . status = = status ) & &
( identical ( other . splitNumber , splitNumber ) | |
other . splitNumber = = splitNumber ) & &
( identical ( other . splitTotal , splitTotal ) | |
other . splitTotal = = splitTotal ) & &
( identical ( other . splitDescription , splitDescription ) | |
other . splitDescription = = splitDescription ) & &
( identical ( other . refundAmount , refundAmount ) | |
other . refundAmount = = refundAmount ) & &
const DeepCollectionEquality ( ) . equals ( other . _metadata , _metadata ) & &
( identical ( other . createdAt , createdAt ) | |
other . createdAt = = createdAt ) & &
( identical ( other . updatedAt , updatedAt ) | |
other . updatedAt = = updatedAt ) ) ;
}
@ override
int get hashCode = > Object . hash (
runtimeType ,
id ,
orderId ,
paymentMethodId ,
paymentMethodName ,
paymentMethodType ,
amount ,
status ,
splitNumber ,
splitTotal ,
splitDescription ,
refundAmount ,
const DeepCollectionEquality ( ) . hash ( _metadata ) ,
createdAt ,
updatedAt ,
) ;
/// Create a copy of Payment
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $PaymentImplCopyWith < _ $PaymentImpl > get copyWith = >
__ $ $PaymentImplCopyWithImpl < _ $PaymentImpl > ( this , _ $identity ) ;
}
abstract class _Payment implements Payment {
const factory _Payment ( {
required final String id ,
required final String orderId ,
required final String paymentMethodId ,
required final String paymentMethodName ,
required final String paymentMethodType ,
required final int amount ,
required final String status ,
required final int splitNumber ,
required final int splitTotal ,
required final String splitDescription ,
required final int refundAmount ,
required final Map < String , dynamic > metadata ,
required final DateTime createdAt ,
required final DateTime updatedAt ,
} ) = _ $PaymentImpl ;
@ override
String get id ;
@ override
String get orderId ;
@ override
String get paymentMethodId ;
@ override
String get paymentMethodName ;
@ override
String get paymentMethodType ;
@ override
int get amount ;
@ override
String get status ;
@ override
int get splitNumber ;
@ override
int get splitTotal ;
@ override
String get splitDescription ;
@ override
int get refundAmount ;
@ override
Map < String , dynamic > get metadata ;
@ override
DateTime get createdAt ;
@ override
DateTime get updatedAt ;
/// Create a copy of Payment
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $PaymentImplCopyWith < _ $PaymentImpl > get copyWith = >
2025-10-28 00:08:12 +07:00
throw _privateConstructorUsedError ;
2025-10-27 21:55:19 +07:00
}
/// @nodoc
mixin _ $OrderFailure {
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ApiFailure failure ) serverError ,
required TResult Function ( ) unexpectedError ,
required TResult Function ( ) empty ,
required TResult Function ( String erroMessage ) localStorageError ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) = > throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? localStorageError ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) = > throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
TResult Function ( String erroMessage ) ? localStorageError ,
TResult Function ( String erroMessage ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) = > throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _ServerError value ) serverError ,
required TResult Function ( _UnexpectedError value ) unexpectedError ,
required TResult Function ( _Empty value ) empty ,
required TResult Function ( _LocalStorageError value ) localStorageError ,
required TResult Function ( _DynamicErrorMessage value ) dynamicErrorMessage ,
} ) = > throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _ServerError value ) ? serverError ,
TResult ? Function ( _UnexpectedError value ) ? unexpectedError ,
TResult ? Function ( _Empty value ) ? empty ,
TResult ? Function ( _LocalStorageError value ) ? localStorageError ,
TResult ? Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
} ) = > throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _ServerError value ) ? serverError ,
TResult Function ( _UnexpectedError value ) ? unexpectedError ,
TResult Function ( _Empty value ) ? empty ,
TResult Function ( _LocalStorageError value ) ? localStorageError ,
TResult Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) = > throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $OrderFailureCopyWith < $Res > {
factory $OrderFailureCopyWith (
OrderFailure value ,
$Res Function ( OrderFailure ) then ,
) = _ $OrderFailureCopyWithImpl < $Res , OrderFailure > ;
}
/// @nodoc
class _ $OrderFailureCopyWithImpl < $Res , $Val extends OrderFailure >
implements $OrderFailureCopyWith < $Res > {
_ $OrderFailureCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
abstract class _ $ $ServerErrorImplCopyWith < $Res > {
factory _ $ $ServerErrorImplCopyWith (
_ $ServerErrorImpl value ,
$Res Function ( _ $ServerErrorImpl ) then ,
) = __ $ $ServerErrorImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { ApiFailure failure } ) ;
$ApiFailureCopyWith < $Res > get failure ;
}
/// @nodoc
class __ $ $ServerErrorImplCopyWithImpl < $Res >
extends _ $OrderFailureCopyWithImpl < $Res , _ $ServerErrorImpl >
implements _ $ $ServerErrorImplCopyWith < $Res > {
__ $ $ServerErrorImplCopyWithImpl (
_ $ServerErrorImpl _value ,
$Res Function ( _ $ServerErrorImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( { Object ? failure = null } ) {
return _then (
_ $ServerErrorImpl (
null = = failure
? _value . failure
: failure // ignore: cast_nullable_to_non_nullable
as ApiFailure ,
) ,
) ;
}
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( ' vm:prefer-inline ' )
$ApiFailureCopyWith < $Res > get failure {
return $ApiFailureCopyWith < $Res > ( _value . failure , ( value ) {
return _then ( _value . copyWith ( failure: value ) ) ;
} ) ;
}
}
/// @nodoc
class _ $ServerErrorImpl implements _ServerError {
const _ $ServerErrorImpl ( this . failure ) ;
@ override
final ApiFailure failure ;
@ override
String toString ( ) {
return ' OrderFailure.serverError(failure: $ failure ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $ServerErrorImpl & &
( identical ( other . failure , failure ) | | other . failure = = failure ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , failure ) ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $ServerErrorImplCopyWith < _ $ServerErrorImpl > get copyWith = >
__ $ $ServerErrorImplCopyWithImpl < _ $ServerErrorImpl > ( this , _ $identity ) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ApiFailure failure ) serverError ,
required TResult Function ( ) unexpectedError ,
required TResult Function ( ) empty ,
required TResult Function ( String erroMessage ) localStorageError ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) {
return serverError ( failure ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? localStorageError ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) {
return serverError ? . call ( failure ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
TResult Function ( String erroMessage ) ? localStorageError ,
TResult Function ( String erroMessage ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( serverError ! = null ) {
return serverError ( failure ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _ServerError value ) serverError ,
required TResult Function ( _UnexpectedError value ) unexpectedError ,
required TResult Function ( _Empty value ) empty ,
required TResult Function ( _LocalStorageError value ) localStorageError ,
required TResult Function ( _DynamicErrorMessage value ) dynamicErrorMessage ,
} ) {
return serverError ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _ServerError value ) ? serverError ,
TResult ? Function ( _UnexpectedError value ) ? unexpectedError ,
TResult ? Function ( _Empty value ) ? empty ,
TResult ? Function ( _LocalStorageError value ) ? localStorageError ,
TResult ? Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
} ) {
return serverError ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _ServerError value ) ? serverError ,
TResult Function ( _UnexpectedError value ) ? unexpectedError ,
TResult Function ( _Empty value ) ? empty ,
TResult Function ( _LocalStorageError value ) ? localStorageError ,
TResult Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( serverError ! = null ) {
return serverError ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _ServerError implements OrderFailure {
const factory _ServerError ( final ApiFailure failure ) = _ $ServerErrorImpl ;
ApiFailure get failure ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $ServerErrorImplCopyWith < _ $ServerErrorImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $UnexpectedErrorImplCopyWith < $Res > {
factory _ $ $UnexpectedErrorImplCopyWith (
_ $UnexpectedErrorImpl value ,
$Res Function ( _ $UnexpectedErrorImpl ) then ,
) = __ $ $UnexpectedErrorImplCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $ $UnexpectedErrorImplCopyWithImpl < $Res >
extends _ $OrderFailureCopyWithImpl < $Res , _ $UnexpectedErrorImpl >
implements _ $ $UnexpectedErrorImplCopyWith < $Res > {
__ $ $UnexpectedErrorImplCopyWithImpl (
_ $UnexpectedErrorImpl _value ,
$Res Function ( _ $UnexpectedErrorImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _ $UnexpectedErrorImpl implements _UnexpectedError {
const _ $UnexpectedErrorImpl ( ) ;
@ override
String toString ( ) {
return ' OrderFailure.unexpectedError() ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & & other is _ $UnexpectedErrorImpl ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ApiFailure failure ) serverError ,
required TResult Function ( ) unexpectedError ,
required TResult Function ( ) empty ,
required TResult Function ( String erroMessage ) localStorageError ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) {
return unexpectedError ( ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? localStorageError ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) {
return unexpectedError ? . call ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
TResult Function ( String erroMessage ) ? localStorageError ,
TResult Function ( String erroMessage ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( unexpectedError ! = null ) {
return unexpectedError ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _ServerError value ) serverError ,
required TResult Function ( _UnexpectedError value ) unexpectedError ,
required TResult Function ( _Empty value ) empty ,
required TResult Function ( _LocalStorageError value ) localStorageError ,
required TResult Function ( _DynamicErrorMessage value ) dynamicErrorMessage ,
} ) {
return unexpectedError ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _ServerError value ) ? serverError ,
TResult ? Function ( _UnexpectedError value ) ? unexpectedError ,
TResult ? Function ( _Empty value ) ? empty ,
TResult ? Function ( _LocalStorageError value ) ? localStorageError ,
TResult ? Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
} ) {
return unexpectedError ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _ServerError value ) ? serverError ,
TResult Function ( _UnexpectedError value ) ? unexpectedError ,
TResult Function ( _Empty value ) ? empty ,
TResult Function ( _LocalStorageError value ) ? localStorageError ,
TResult Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( unexpectedError ! = null ) {
return unexpectedError ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _UnexpectedError implements OrderFailure {
const factory _UnexpectedError ( ) = _ $UnexpectedErrorImpl ;
}
/// @nodoc
abstract class _ $ $EmptyImplCopyWith < $Res > {
factory _ $ $EmptyImplCopyWith (
_ $EmptyImpl value ,
$Res Function ( _ $EmptyImpl ) then ,
) = __ $ $EmptyImplCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $ $EmptyImplCopyWithImpl < $Res >
extends _ $OrderFailureCopyWithImpl < $Res , _ $EmptyImpl >
implements _ $ $EmptyImplCopyWith < $Res > {
__ $ $EmptyImplCopyWithImpl (
_ $EmptyImpl _value ,
$Res Function ( _ $EmptyImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
class _ $EmptyImpl implements _Empty {
const _ $EmptyImpl ( ) ;
@ override
String toString ( ) {
return ' OrderFailure.empty() ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & & other is _ $EmptyImpl ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ApiFailure failure ) serverError ,
required TResult Function ( ) unexpectedError ,
required TResult Function ( ) empty ,
required TResult Function ( String erroMessage ) localStorageError ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) {
return empty ( ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? localStorageError ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) {
return empty ? . call ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
TResult Function ( String erroMessage ) ? localStorageError ,
TResult Function ( String erroMessage ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( empty ! = null ) {
return empty ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _ServerError value ) serverError ,
required TResult Function ( _UnexpectedError value ) unexpectedError ,
required TResult Function ( _Empty value ) empty ,
required TResult Function ( _LocalStorageError value ) localStorageError ,
required TResult Function ( _DynamicErrorMessage value ) dynamicErrorMessage ,
} ) {
return empty ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _ServerError value ) ? serverError ,
TResult ? Function ( _UnexpectedError value ) ? unexpectedError ,
TResult ? Function ( _Empty value ) ? empty ,
TResult ? Function ( _LocalStorageError value ) ? localStorageError ,
TResult ? Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
} ) {
return empty ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _ServerError value ) ? serverError ,
TResult Function ( _UnexpectedError value ) ? unexpectedError ,
TResult Function ( _Empty value ) ? empty ,
TResult Function ( _LocalStorageError value ) ? localStorageError ,
TResult Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( empty ! = null ) {
return empty ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _Empty implements OrderFailure {
const factory _Empty ( ) = _ $EmptyImpl ;
}
/// @nodoc
abstract class _ $ $LocalStorageErrorImplCopyWith < $Res > {
factory _ $ $LocalStorageErrorImplCopyWith (
_ $LocalStorageErrorImpl value ,
$Res Function ( _ $LocalStorageErrorImpl ) then ,
) = __ $ $LocalStorageErrorImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { String erroMessage } ) ;
}
/// @nodoc
class __ $ $LocalStorageErrorImplCopyWithImpl < $Res >
extends _ $OrderFailureCopyWithImpl < $Res , _ $LocalStorageErrorImpl >
implements _ $ $LocalStorageErrorImplCopyWith < $Res > {
__ $ $LocalStorageErrorImplCopyWithImpl (
_ $LocalStorageErrorImpl _value ,
$Res Function ( _ $LocalStorageErrorImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( { Object ? erroMessage = null } ) {
return _then (
_ $LocalStorageErrorImpl (
null = = erroMessage
? _value . erroMessage
: erroMessage // ignore: cast_nullable_to_non_nullable
as String ,
) ,
) ;
}
}
/// @nodoc
class _ $LocalStorageErrorImpl implements _LocalStorageError {
const _ $LocalStorageErrorImpl ( this . erroMessage ) ;
@ override
final String erroMessage ;
@ override
String toString ( ) {
return ' OrderFailure.localStorageError(erroMessage: $ erroMessage ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $LocalStorageErrorImpl & &
( identical ( other . erroMessage , erroMessage ) | |
other . erroMessage = = erroMessage ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , erroMessage ) ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $LocalStorageErrorImplCopyWith < _ $LocalStorageErrorImpl > get copyWith = >
__ $ $LocalStorageErrorImplCopyWithImpl < _ $LocalStorageErrorImpl > (
this ,
_ $identity ,
) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ApiFailure failure ) serverError ,
required TResult Function ( ) unexpectedError ,
required TResult Function ( ) empty ,
required TResult Function ( String erroMessage ) localStorageError ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) {
return localStorageError ( erroMessage ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? localStorageError ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) {
return localStorageError ? . call ( erroMessage ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
TResult Function ( String erroMessage ) ? localStorageError ,
TResult Function ( String erroMessage ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( localStorageError ! = null ) {
return localStorageError ( erroMessage ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _ServerError value ) serverError ,
required TResult Function ( _UnexpectedError value ) unexpectedError ,
required TResult Function ( _Empty value ) empty ,
required TResult Function ( _LocalStorageError value ) localStorageError ,
required TResult Function ( _DynamicErrorMessage value ) dynamicErrorMessage ,
} ) {
return localStorageError ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _ServerError value ) ? serverError ,
TResult ? Function ( _UnexpectedError value ) ? unexpectedError ,
TResult ? Function ( _Empty value ) ? empty ,
TResult ? Function ( _LocalStorageError value ) ? localStorageError ,
TResult ? Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
} ) {
return localStorageError ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _ServerError value ) ? serverError ,
TResult Function ( _UnexpectedError value ) ? unexpectedError ,
TResult Function ( _Empty value ) ? empty ,
TResult Function ( _LocalStorageError value ) ? localStorageError ,
TResult Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( localStorageError ! = null ) {
return localStorageError ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _LocalStorageError implements OrderFailure {
const factory _LocalStorageError ( final String erroMessage ) =
_ $LocalStorageErrorImpl ;
String get erroMessage ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $LocalStorageErrorImplCopyWith < _ $LocalStorageErrorImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $ $DynamicErrorMessageImplCopyWith < $Res > {
factory _ $ $DynamicErrorMessageImplCopyWith (
_ $DynamicErrorMessageImpl value ,
$Res Function ( _ $DynamicErrorMessageImpl ) then ,
) = __ $ $DynamicErrorMessageImplCopyWithImpl < $Res > ;
@ useResult
$Res call ( { String erroMessage } ) ;
}
/// @nodoc
class __ $ $DynamicErrorMessageImplCopyWithImpl < $Res >
extends _ $OrderFailureCopyWithImpl < $Res , _ $DynamicErrorMessageImpl >
implements _ $ $DynamicErrorMessageImplCopyWith < $Res > {
__ $ $DynamicErrorMessageImplCopyWithImpl (
_ $DynamicErrorMessageImpl _value ,
$Res Function ( _ $DynamicErrorMessageImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( ' vm:prefer-inline ' )
@ override
$Res call ( { Object ? erroMessage = null } ) {
return _then (
_ $DynamicErrorMessageImpl (
null = = erroMessage
? _value . erroMessage
: erroMessage // ignore: cast_nullable_to_non_nullable
as String ,
) ,
) ;
}
}
/// @nodoc
class _ $DynamicErrorMessageImpl implements _DynamicErrorMessage {
const _ $DynamicErrorMessageImpl ( this . erroMessage ) ;
@ override
final String erroMessage ;
@ override
String toString ( ) {
return ' OrderFailure.dynamicErrorMessage(erroMessage: $ erroMessage ) ' ;
}
@ override
bool operator = = ( Object other ) {
return identical ( this , other ) | |
( other . runtimeType = = runtimeType & &
other is _ $DynamicErrorMessageImpl & &
( identical ( other . erroMessage , erroMessage ) | |
other . erroMessage = = erroMessage ) ) ;
}
@ override
int get hashCode = > Object . hash ( runtimeType , erroMessage ) ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $DynamicErrorMessageImplCopyWith < _ $DynamicErrorMessageImpl > get copyWith = >
__ $ $DynamicErrorMessageImplCopyWithImpl < _ $DynamicErrorMessageImpl > (
this ,
_ $identity ,
) ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ApiFailure failure ) serverError ,
required TResult Function ( ) unexpectedError ,
required TResult Function ( ) empty ,
required TResult Function ( String erroMessage ) localStorageError ,
required TResult Function ( String erroMessage ) dynamicErrorMessage ,
} ) {
return dynamicErrorMessage ( erroMessage ) ;
}
@ override
@ optionalTypeArgs
TResult ? whenOrNull < TResult extends Object ? > ( {
TResult ? Function ( ApiFailure failure ) ? serverError ,
TResult ? Function ( ) ? unexpectedError ,
TResult ? Function ( ) ? empty ,
TResult ? Function ( String erroMessage ) ? localStorageError ,
TResult ? Function ( String erroMessage ) ? dynamicErrorMessage ,
} ) {
return dynamicErrorMessage ? . call ( erroMessage ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ApiFailure failure ) ? serverError ,
TResult Function ( ) ? unexpectedError ,
TResult Function ( ) ? empty ,
TResult Function ( String erroMessage ) ? localStorageError ,
TResult Function ( String erroMessage ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( dynamicErrorMessage ! = null ) {
return dynamicErrorMessage ( erroMessage ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( _ServerError value ) serverError ,
required TResult Function ( _UnexpectedError value ) unexpectedError ,
required TResult Function ( _Empty value ) empty ,
required TResult Function ( _LocalStorageError value ) localStorageError ,
required TResult Function ( _DynamicErrorMessage value ) dynamicErrorMessage ,
} ) {
return dynamicErrorMessage ( this ) ;
}
@ override
@ optionalTypeArgs
TResult ? mapOrNull < TResult extends Object ? > ( {
TResult ? Function ( _ServerError value ) ? serverError ,
TResult ? Function ( _UnexpectedError value ) ? unexpectedError ,
TResult ? Function ( _Empty value ) ? empty ,
TResult ? Function ( _LocalStorageError value ) ? localStorageError ,
TResult ? Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
} ) {
return dynamicErrorMessage ? . call ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( _ServerError value ) ? serverError ,
TResult Function ( _UnexpectedError value ) ? unexpectedError ,
TResult Function ( _Empty value ) ? empty ,
TResult Function ( _LocalStorageError value ) ? localStorageError ,
TResult Function ( _DynamicErrorMessage value ) ? dynamicErrorMessage ,
required TResult orElse ( ) ,
} ) {
if ( dynamicErrorMessage ! = null ) {
return dynamicErrorMessage ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _DynamicErrorMessage implements OrderFailure {
const factory _DynamicErrorMessage ( final String erroMessage ) =
_ $DynamicErrorMessageImpl ;
String get erroMessage ;
/// Create a copy of OrderFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $DynamicErrorMessageImplCopyWith < _ $DynamicErrorMessageImpl > get copyWith = >
throw _privateConstructorUsedError ;
}