|
|
|
@@ -34,6 +34,8 @@ mixin _$OrderFormEvent {
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult Function(String orderId, List<ProductQuantity> items)
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
@@ -52,6 +54,8 @@ mixin _$OrderFormEvent {
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult? Function(String orderId, List<ProductQuantity> items)?
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
@@ -70,6 +74,7 @@ mixin _$OrderFormEvent {
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult Function(String orderId, List<ProductQuantity> items)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
@@ -80,6 +85,7 @@ mixin _$OrderFormEvent {
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
required TResult Function(_AddItemOrder value) addItemOrder,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
@@ -88,6 +94,7 @@ mixin _$OrderFormEvent {
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult? Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
@@ -96,6 +103,7 @@ mixin _$OrderFormEvent {
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
@@ -221,6 +229,8 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult Function(String orderId, List<ProductQuantity> items)
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerNameChanged(customerName);
|
|
|
|
|
}
|
|
|
|
@@ -243,6 +253,8 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult? Function(String orderId, List<ProductQuantity> items)?
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerNameChanged?.call(customerName);
|
|
|
|
|
}
|
|
|
|
@@ -265,6 +277,7 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult Function(String orderId, List<ProductQuantity> items)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (customerNameChanged != null) {
|
|
|
|
@@ -282,6 +295,7 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
required TResult Function(_AddItemOrder value) addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerNameChanged(this);
|
|
|
|
|
}
|
|
|
|
@@ -294,6 +308,7 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult? Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerNameChanged?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -306,6 +321,7 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (customerNameChanged != null) {
|
|
|
|
@@ -439,6 +455,8 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult Function(String orderId, List<ProductQuantity> items)
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return paymentMethodChanged(payment);
|
|
|
|
|
}
|
|
|
|
@@ -461,6 +479,8 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult? Function(String orderId, List<ProductQuantity> items)?
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return paymentMethodChanged?.call(payment);
|
|
|
|
|
}
|
|
|
|
@@ -483,6 +503,7 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult Function(String orderId, List<ProductQuantity> items)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (paymentMethodChanged != null) {
|
|
|
|
@@ -500,6 +521,7 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
required TResult Function(_AddItemOrder value) addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return paymentMethodChanged(this);
|
|
|
|
|
}
|
|
|
|
@@ -512,6 +534,7 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult? Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return paymentMethodChanged?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -524,6 +547,7 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (paymentMethodChanged != null) {
|
|
|
|
@@ -661,6 +685,8 @@ class _$CustomerChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult Function(String orderId, List<ProductQuantity> items)
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerChanged(customer);
|
|
|
|
|
}
|
|
|
|
@@ -683,6 +709,8 @@ class _$CustomerChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult? Function(String orderId, List<ProductQuantity> items)?
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerChanged?.call(customer);
|
|
|
|
|
}
|
|
|
|
@@ -705,6 +733,7 @@ class _$CustomerChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult Function(String orderId, List<ProductQuantity> items)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (customerChanged != null) {
|
|
|
|
@@ -722,6 +751,7 @@ class _$CustomerChangedImpl
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
required TResult Function(_AddItemOrder value) addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerChanged(this);
|
|
|
|
|
}
|
|
|
|
@@ -734,6 +764,7 @@ class _$CustomerChangedImpl
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult? Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerChanged?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -746,6 +777,7 @@ class _$CustomerChangedImpl
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (customerChanged != null) {
|
|
|
|
@@ -921,6 +953,8 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult Function(String orderId, List<ProductQuantity> items)
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrderWithPayment(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
@@ -943,6 +977,8 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult? Function(String orderId, List<ProductQuantity> items)?
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrderWithPayment?.call(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
@@ -965,6 +1001,7 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult Function(String orderId, List<ProductQuantity> items)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (createOrderWithPayment != null) {
|
|
|
|
@@ -982,6 +1019,7 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
required TResult Function(_AddItemOrder value) addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrderWithPayment(this);
|
|
|
|
|
}
|
|
|
|
@@ -994,6 +1032,7 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult? Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrderWithPayment?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -1006,6 +1045,7 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (createOrderWithPayment != null) {
|
|
|
|
@@ -1178,6 +1218,8 @@ class _$CreateOrderImpl with DiagnosticableTreeMixin implements _CreateOrder {
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult Function(String orderId, List<ProductQuantity> items)
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrder(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
@@ -1200,6 +1242,8 @@ class _$CreateOrderImpl with DiagnosticableTreeMixin implements _CreateOrder {
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult? Function(String orderId, List<ProductQuantity> items)?
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrder?.call(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
@@ -1222,6 +1266,7 @@ class _$CreateOrderImpl with DiagnosticableTreeMixin implements _CreateOrder {
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult Function(String orderId, List<ProductQuantity> items)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (createOrder != null) {
|
|
|
|
@@ -1239,6 +1284,7 @@ class _$CreateOrderImpl with DiagnosticableTreeMixin implements _CreateOrder {
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
required TResult Function(_AddItemOrder value) addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrder(this);
|
|
|
|
|
}
|
|
|
|
@@ -1251,6 +1297,7 @@ class _$CreateOrderImpl with DiagnosticableTreeMixin implements _CreateOrder {
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult? Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrder?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -1263,6 +1310,7 @@ class _$CreateOrderImpl with DiagnosticableTreeMixin implements _CreateOrder {
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (createOrder != null) {
|
|
|
|
@@ -1290,6 +1338,237 @@ abstract class _CreateOrder implements OrderFormEvent {
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$AddItemOrderImplCopyWith<$Res> {
|
|
|
|
|
factory _$$AddItemOrderImplCopyWith(
|
|
|
|
|
_$AddItemOrderImpl value,
|
|
|
|
|
$Res Function(_$AddItemOrderImpl) then,
|
|
|
|
|
) = __$$AddItemOrderImplCopyWithImpl<$Res>;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({String orderId, List<ProductQuantity> items});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$AddItemOrderImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$OrderFormEventCopyWithImpl<$Res, _$AddItemOrderImpl>
|
|
|
|
|
implements _$$AddItemOrderImplCopyWith<$Res> {
|
|
|
|
|
__$$AddItemOrderImplCopyWithImpl(
|
|
|
|
|
_$AddItemOrderImpl _value,
|
|
|
|
|
$Res Function(_$AddItemOrderImpl) _then,
|
|
|
|
|
) : super(_value, _then);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
@override
|
|
|
|
|
$Res call({Object? orderId = null, Object? items = null}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_$AddItemOrderImpl(
|
|
|
|
|
orderId: null == orderId
|
|
|
|
|
? _value.orderId
|
|
|
|
|
: orderId // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String,
|
|
|
|
|
items: null == items
|
|
|
|
|
? _value._items
|
|
|
|
|
: items // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as List<ProductQuantity>,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$AddItemOrderImpl with DiagnosticableTreeMixin implements _AddItemOrder {
|
|
|
|
|
const _$AddItemOrderImpl({
|
|
|
|
|
required this.orderId,
|
|
|
|
|
required final List<ProductQuantity> items,
|
|
|
|
|
}) : _items = items;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
final String orderId;
|
|
|
|
|
final List<ProductQuantity> _items;
|
|
|
|
|
@override
|
|
|
|
|
List<ProductQuantity> get items {
|
|
|
|
|
if (_items is EqualUnmodifiableListView) return _items;
|
|
|
|
|
// ignore: implicit_dynamic_type
|
|
|
|
|
return EqualUnmodifiableListView(_items);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
|
|
|
return 'OrderFormEvent.addItemOrder(orderId: $orderId, items: $items)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
|
|
|
super.debugFillProperties(properties);
|
|
|
|
|
properties
|
|
|
|
|
..add(DiagnosticsProperty('type', 'OrderFormEvent.addItemOrder'))
|
|
|
|
|
..add(DiagnosticsProperty('orderId', orderId))
|
|
|
|
|
..add(DiagnosticsProperty('items', items));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType &&
|
|
|
|
|
other is _$AddItemOrderImpl &&
|
|
|
|
|
(identical(other.orderId, orderId) || other.orderId == orderId) &&
|
|
|
|
|
const DeepCollectionEquality().equals(other._items, _items));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(
|
|
|
|
|
runtimeType,
|
|
|
|
|
orderId,
|
|
|
|
|
const DeepCollectionEquality().hash(_items),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
_$$AddItemOrderImplCopyWith<_$AddItemOrderImpl> get copyWith =>
|
|
|
|
|
__$$AddItemOrderImplCopyWithImpl<_$AddItemOrderImpl>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function(String customerName) customerNameChanged,
|
|
|
|
|
required TResult Function(PaymentMethod payment) paymentMethodChanged,
|
|
|
|
|
required TResult Function(Customer? customer) customerChanged,
|
|
|
|
|
required TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult Function(String orderId, List<ProductQuantity> items)
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return addItemOrder(orderId, items);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(String customerName)? customerNameChanged,
|
|
|
|
|
TResult? Function(PaymentMethod payment)? paymentMethodChanged,
|
|
|
|
|
TResult? Function(Customer? customer)? customerChanged,
|
|
|
|
|
TResult? Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult? Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult? Function(String orderId, List<ProductQuantity> items)?
|
|
|
|
|
addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return addItemOrder?.call(orderId, items);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function(String customerName)? customerNameChanged,
|
|
|
|
|
TResult Function(PaymentMethod payment)? paymentMethodChanged,
|
|
|
|
|
TResult Function(Customer? customer)? customerChanged,
|
|
|
|
|
TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
TResult Function(String orderId, List<ProductQuantity> items)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (addItemOrder != null) {
|
|
|
|
|
return addItemOrder(orderId, items);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_CustomerNameChanged value) customerNameChanged,
|
|
|
|
|
required TResult Function(_PaymentMethodChanged value) paymentMethodChanged,
|
|
|
|
|
required TResult Function(_CustomerChanged value) customerChanged,
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
required TResult Function(_AddItemOrder value) addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return addItemOrder(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_CustomerNameChanged value)? customerNameChanged,
|
|
|
|
|
TResult? Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult? Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return addItemOrder?.call(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_CustomerNameChanged value)? customerNameChanged,
|
|
|
|
|
TResult Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
TResult Function(_AddItemOrder value)? addItemOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (addItemOrder != null) {
|
|
|
|
|
return addItemOrder(this);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _AddItemOrder implements OrderFormEvent {
|
|
|
|
|
const factory _AddItemOrder({
|
|
|
|
|
required final String orderId,
|
|
|
|
|
required final List<ProductQuantity> items,
|
|
|
|
|
}) = _$AddItemOrderImpl;
|
|
|
|
|
|
|
|
|
|
String get orderId;
|
|
|
|
|
List<ProductQuantity> get items;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
_$$AddItemOrderImplCopyWith<_$AddItemOrderImpl> get copyWith =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
mixin _$OrderFormState {
|
|
|
|
|
PaymentMethod? get paymentMethod => throw _privateConstructorUsedError;
|
|
|
|
@@ -1299,8 +1578,11 @@ mixin _$OrderFormState {
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
Option<Either<OrderFailure, Order>> get failureOrCreateOrderWithPayment =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
Option<Either<OrderFailure, Order>> get failureOrAddItemOrder =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
bool get isCreating => throw _privateConstructorUsedError;
|
|
|
|
|
bool get isCreatingWithPayment => throw _privateConstructorUsedError;
|
|
|
|
|
bool get isAddingItemOrder => throw _privateConstructorUsedError;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
@@ -1322,8 +1604,10 @@ abstract class $OrderFormStateCopyWith<$Res> {
|
|
|
|
|
Customer? customer,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrCreateOrder,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrCreateOrderWithPayment,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrAddItemOrder,
|
|
|
|
|
bool isCreating,
|
|
|
|
|
bool isCreatingWithPayment,
|
|
|
|
|
bool isAddingItemOrder,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$PaymentMethodCopyWith<$Res>? get paymentMethod;
|
|
|
|
@@ -1350,8 +1634,10 @@ class _$OrderFormStateCopyWithImpl<$Res, $Val extends OrderFormState>
|
|
|
|
|
Object? customer = freezed,
|
|
|
|
|
Object? failureOrCreateOrder = null,
|
|
|
|
|
Object? failureOrCreateOrderWithPayment = null,
|
|
|
|
|
Object? failureOrAddItemOrder = null,
|
|
|
|
|
Object? isCreating = null,
|
|
|
|
|
Object? isCreatingWithPayment = null,
|
|
|
|
|
Object? isAddingItemOrder = null,
|
|
|
|
|
}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_value.copyWith(
|
|
|
|
@@ -1376,6 +1662,10 @@ class _$OrderFormStateCopyWithImpl<$Res, $Val extends OrderFormState>
|
|
|
|
|
? _value.failureOrCreateOrderWithPayment
|
|
|
|
|
: failureOrCreateOrderWithPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Order>>,
|
|
|
|
|
failureOrAddItemOrder: null == failureOrAddItemOrder
|
|
|
|
|
? _value.failureOrAddItemOrder
|
|
|
|
|
: failureOrAddItemOrder // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Order>>,
|
|
|
|
|
isCreating: null == isCreating
|
|
|
|
|
? _value.isCreating
|
|
|
|
|
: isCreating // ignore: cast_nullable_to_non_nullable
|
|
|
|
@@ -1384,6 +1674,10 @@ class _$OrderFormStateCopyWithImpl<$Res, $Val extends OrderFormState>
|
|
|
|
|
? _value.isCreatingWithPayment
|
|
|
|
|
: isCreatingWithPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
isAddingItemOrder: null == isAddingItemOrder
|
|
|
|
|
? _value.isAddingItemOrder
|
|
|
|
|
: isAddingItemOrder // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
)
|
|
|
|
|
as $Val,
|
|
|
|
|
);
|
|
|
|
@@ -1433,8 +1727,10 @@ abstract class _$$OrderFormStateImplCopyWith<$Res>
|
|
|
|
|
Customer? customer,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrCreateOrder,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrCreateOrderWithPayment,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrAddItemOrder,
|
|
|
|
|
bool isCreating,
|
|
|
|
|
bool isCreatingWithPayment,
|
|
|
|
|
bool isAddingItemOrder,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1462,8 +1758,10 @@ class __$$OrderFormStateImplCopyWithImpl<$Res>
|
|
|
|
|
Object? customer = freezed,
|
|
|
|
|
Object? failureOrCreateOrder = null,
|
|
|
|
|
Object? failureOrCreateOrderWithPayment = null,
|
|
|
|
|
Object? failureOrAddItemOrder = null,
|
|
|
|
|
Object? isCreating = null,
|
|
|
|
|
Object? isCreatingWithPayment = null,
|
|
|
|
|
Object? isAddingItemOrder = null,
|
|
|
|
|
}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_$OrderFormStateImpl(
|
|
|
|
@@ -1487,6 +1785,10 @@ class __$$OrderFormStateImplCopyWithImpl<$Res>
|
|
|
|
|
? _value.failureOrCreateOrderWithPayment
|
|
|
|
|
: failureOrCreateOrderWithPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Order>>,
|
|
|
|
|
failureOrAddItemOrder: null == failureOrAddItemOrder
|
|
|
|
|
? _value.failureOrAddItemOrder
|
|
|
|
|
: failureOrAddItemOrder // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Order>>,
|
|
|
|
|
isCreating: null == isCreating
|
|
|
|
|
? _value.isCreating
|
|
|
|
|
: isCreating // ignore: cast_nullable_to_non_nullable
|
|
|
|
@@ -1495,6 +1797,10 @@ class __$$OrderFormStateImplCopyWithImpl<$Res>
|
|
|
|
|
? _value.isCreatingWithPayment
|
|
|
|
|
: isCreatingWithPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
isAddingItemOrder: null == isAddingItemOrder
|
|
|
|
|
? _value.isAddingItemOrder
|
|
|
|
|
: isAddingItemOrder // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@@ -1511,8 +1817,10 @@ class _$OrderFormStateImpl
|
|
|
|
|
this.customer,
|
|
|
|
|
required this.failureOrCreateOrder,
|
|
|
|
|
required this.failureOrCreateOrderWithPayment,
|
|
|
|
|
required this.failureOrAddItemOrder,
|
|
|
|
|
this.isCreating = false,
|
|
|
|
|
this.isCreatingWithPayment = false,
|
|
|
|
|
this.isAddingItemOrder = false,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1526,15 +1834,20 @@ class _$OrderFormStateImpl
|
|
|
|
|
@override
|
|
|
|
|
final Option<Either<OrderFailure, Order>> failureOrCreateOrderWithPayment;
|
|
|
|
|
@override
|
|
|
|
|
final Option<Either<OrderFailure, Order>> failureOrAddItemOrder;
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey()
|
|
|
|
|
final bool isCreating;
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey()
|
|
|
|
|
final bool isCreatingWithPayment;
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey()
|
|
|
|
|
final bool isAddingItemOrder;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
|
|
|
return 'OrderFormState(paymentMethod: $paymentMethod, customerName: $customerName, customer: $customer, failureOrCreateOrder: $failureOrCreateOrder, failureOrCreateOrderWithPayment: $failureOrCreateOrderWithPayment, isCreating: $isCreating, isCreatingWithPayment: $isCreatingWithPayment)';
|
|
|
|
|
return 'OrderFormState(paymentMethod: $paymentMethod, customerName: $customerName, customer: $customer, failureOrCreateOrder: $failureOrCreateOrder, failureOrCreateOrderWithPayment: $failureOrCreateOrderWithPayment, failureOrAddItemOrder: $failureOrAddItemOrder, isCreating: $isCreating, isCreatingWithPayment: $isCreatingWithPayment, isAddingItemOrder: $isAddingItemOrder)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1552,10 +1865,10 @@ class _$OrderFormStateImpl
|
|
|
|
|
failureOrCreateOrderWithPayment,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
..add(DiagnosticsProperty('failureOrAddItemOrder', failureOrAddItemOrder))
|
|
|
|
|
..add(DiagnosticsProperty('isCreating', isCreating))
|
|
|
|
|
..add(
|
|
|
|
|
DiagnosticsProperty('isCreatingWithPayment', isCreatingWithPayment),
|
|
|
|
|
);
|
|
|
|
|
..add(DiagnosticsProperty('isCreatingWithPayment', isCreatingWithPayment))
|
|
|
|
|
..add(DiagnosticsProperty('isAddingItemOrder', isAddingItemOrder));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1577,10 +1890,14 @@ class _$OrderFormStateImpl
|
|
|
|
|
) ||
|
|
|
|
|
other.failureOrCreateOrderWithPayment ==
|
|
|
|
|
failureOrCreateOrderWithPayment) &&
|
|
|
|
|
(identical(other.failureOrAddItemOrder, failureOrAddItemOrder) ||
|
|
|
|
|
other.failureOrAddItemOrder == failureOrAddItemOrder) &&
|
|
|
|
|
(identical(other.isCreating, isCreating) ||
|
|
|
|
|
other.isCreating == isCreating) &&
|
|
|
|
|
(identical(other.isCreatingWithPayment, isCreatingWithPayment) ||
|
|
|
|
|
other.isCreatingWithPayment == isCreatingWithPayment));
|
|
|
|
|
other.isCreatingWithPayment == isCreatingWithPayment) &&
|
|
|
|
|
(identical(other.isAddingItemOrder, isAddingItemOrder) ||
|
|
|
|
|
other.isAddingItemOrder == isAddingItemOrder));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1591,8 +1908,10 @@ class _$OrderFormStateImpl
|
|
|
|
|
customer,
|
|
|
|
|
failureOrCreateOrder,
|
|
|
|
|
failureOrCreateOrderWithPayment,
|
|
|
|
|
failureOrAddItemOrder,
|
|
|
|
|
isCreating,
|
|
|
|
|
isCreatingWithPayment,
|
|
|
|
|
isAddingItemOrder,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormState
|
|
|
|
@@ -1615,8 +1934,10 @@ abstract class _OrderFormState implements OrderFormState {
|
|
|
|
|
required final Option<Either<OrderFailure, Order>> failureOrCreateOrder,
|
|
|
|
|
required final Option<Either<OrderFailure, Order>>
|
|
|
|
|
failureOrCreateOrderWithPayment,
|
|
|
|
|
required final Option<Either<OrderFailure, Order>> failureOrAddItemOrder,
|
|
|
|
|
final bool isCreating,
|
|
|
|
|
final bool isCreatingWithPayment,
|
|
|
|
|
final bool isAddingItemOrder,
|
|
|
|
|
}) = _$OrderFormStateImpl;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1630,9 +1951,13 @@ abstract class _OrderFormState implements OrderFormState {
|
|
|
|
|
@override
|
|
|
|
|
Option<Either<OrderFailure, Order>> get failureOrCreateOrderWithPayment;
|
|
|
|
|
@override
|
|
|
|
|
Option<Either<OrderFailure, Order>> get failureOrAddItemOrder;
|
|
|
|
|
@override
|
|
|
|
|
bool get isCreating;
|
|
|
|
|
@override
|
|
|
|
|
bool get isCreatingWithPayment;
|
|
|
|
|
@override
|
|
|
|
|
bool get isAddingItemOrder;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|