|
|
|
@@ -28,6 +28,12 @@ mixin _$OrderFormEvent {
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
@@ -40,6 +46,12 @@ mixin _$OrderFormEvent {
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult? Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
@@ -52,6 +64,12 @@ mixin _$OrderFormEvent {
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
@@ -61,6 +79,7 @@ mixin _$OrderFormEvent {
|
|
|
|
|
required TResult Function(_CustomerChanged value) customerChanged,
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
@@ -68,6 +87,7 @@ mixin _$OrderFormEvent {
|
|
|
|
|
TResult? Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
@@ -75,6 +95,7 @@ mixin _$OrderFormEvent {
|
|
|
|
|
TResult Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
@@ -194,6 +215,12 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerNameChanged(customerName);
|
|
|
|
|
}
|
|
|
|
@@ -210,6 +237,12 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult? Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerNameChanged?.call(customerName);
|
|
|
|
|
}
|
|
|
|
@@ -226,6 +259,12 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (customerNameChanged != null) {
|
|
|
|
@@ -242,6 +281,7 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
required TResult Function(_CustomerChanged value) customerChanged,
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerNameChanged(this);
|
|
|
|
|
}
|
|
|
|
@@ -253,6 +293,7 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
TResult? Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerNameChanged?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -264,6 +305,7 @@ class _$CustomerNameChangedImpl
|
|
|
|
|
TResult Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (customerNameChanged != null) {
|
|
|
|
@@ -391,6 +433,12 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return paymentMethodChanged(payment);
|
|
|
|
|
}
|
|
|
|
@@ -407,6 +455,12 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult? Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return paymentMethodChanged?.call(payment);
|
|
|
|
|
}
|
|
|
|
@@ -423,6 +477,12 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (paymentMethodChanged != null) {
|
|
|
|
@@ -439,6 +499,7 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
required TResult Function(_CustomerChanged value) customerChanged,
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return paymentMethodChanged(this);
|
|
|
|
|
}
|
|
|
|
@@ -450,6 +511,7 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
TResult? Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return paymentMethodChanged?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -461,6 +523,7 @@ class _$PaymentMethodChangedImpl
|
|
|
|
|
TResult Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (paymentMethodChanged != null) {
|
|
|
|
@@ -592,6 +655,12 @@ class _$CustomerChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerChanged(customer);
|
|
|
|
|
}
|
|
|
|
@@ -608,6 +677,12 @@ class _$CustomerChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult? Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerChanged?.call(customer);
|
|
|
|
|
}
|
|
|
|
@@ -624,6 +699,12 @@ class _$CustomerChangedImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (customerChanged != null) {
|
|
|
|
@@ -640,6 +721,7 @@ class _$CustomerChangedImpl
|
|
|
|
|
required TResult Function(_CustomerChanged value) customerChanged,
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerChanged(this);
|
|
|
|
|
}
|
|
|
|
@@ -651,6 +733,7 @@ class _$CustomerChangedImpl
|
|
|
|
|
TResult? Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return customerChanged?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -662,6 +745,7 @@ class _$CustomerChangedImpl
|
|
|
|
|
TResult Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (customerChanged != null) {
|
|
|
|
@@ -831,6 +915,12 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)
|
|
|
|
|
createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrderWithPayment(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
@@ -847,6 +937,12 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult? Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrderWithPayment?.call(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
@@ -863,6 +959,12 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
TResult Function(
|
|
|
|
|
List<ProductQuantity> items,
|
|
|
|
|
OrderType orderType,
|
|
|
|
|
Table? table,
|
|
|
|
|
)?
|
|
|
|
|
createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (createOrderWithPayment != null) {
|
|
|
|
@@ -879,6 +981,7 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
required TResult Function(_CustomerChanged value) customerChanged,
|
|
|
|
|
required TResult Function(_CreateOrderWithPayment value)
|
|
|
|
|
createOrderWithPayment,
|
|
|
|
|
required TResult Function(_CreateOrder value) createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrderWithPayment(this);
|
|
|
|
|
}
|
|
|
|
@@ -890,6 +993,7 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
TResult? Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult? Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult? Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult? Function(_CreateOrder value)? createOrder,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrderWithPayment?.call(this);
|
|
|
|
|
}
|
|
|
|
@@ -901,6 +1005,7 @@ class _$CreateOrderWithPaymentImpl
|
|
|
|
|
TResult Function(_PaymentMethodChanged value)? paymentMethodChanged,
|
|
|
|
|
TResult Function(_CustomerChanged value)? customerChanged,
|
|
|
|
|
TResult Function(_CreateOrderWithPayment value)? createOrderWithPayment,
|
|
|
|
|
TResult Function(_CreateOrder value)? createOrder,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (createOrderWithPayment != null) {
|
|
|
|
@@ -928,6 +1033,263 @@ abstract class _CreateOrderWithPayment implements OrderFormEvent {
|
|
|
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$CreateOrderImplCopyWith<$Res> {
|
|
|
|
|
factory _$$CreateOrderImplCopyWith(
|
|
|
|
|
_$CreateOrderImpl value,
|
|
|
|
|
$Res Function(_$CreateOrderImpl) then,
|
|
|
|
|
) = __$$CreateOrderImplCopyWithImpl<$Res>;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({List<ProductQuantity> items, OrderType orderType, Table? table});
|
|
|
|
|
|
|
|
|
|
$TableCopyWith<$Res>? get table;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$CreateOrderImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$OrderFormEventCopyWithImpl<$Res, _$CreateOrderImpl>
|
|
|
|
|
implements _$$CreateOrderImplCopyWith<$Res> {
|
|
|
|
|
__$$CreateOrderImplCopyWithImpl(
|
|
|
|
|
_$CreateOrderImpl _value,
|
|
|
|
|
$Res Function(_$CreateOrderImpl) _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? items = null,
|
|
|
|
|
Object? orderType = null,
|
|
|
|
|
Object? table = freezed,
|
|
|
|
|
}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_$CreateOrderImpl(
|
|
|
|
|
items: null == items
|
|
|
|
|
? _value._items
|
|
|
|
|
: items // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as List<ProductQuantity>,
|
|
|
|
|
orderType: null == orderType
|
|
|
|
|
? _value.orderType
|
|
|
|
|
: orderType // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as OrderType,
|
|
|
|
|
table: freezed == table
|
|
|
|
|
? _value.table
|
|
|
|
|
: table // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Table?,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
$TableCopyWith<$Res>? get table {
|
|
|
|
|
if (_value.table == null) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $TableCopyWith<$Res>(_value.table!, (value) {
|
|
|
|
|
return _then(_value.copyWith(table: value));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$CreateOrderImpl with DiagnosticableTreeMixin implements _CreateOrder {
|
|
|
|
|
const _$CreateOrderImpl({
|
|
|
|
|
required final List<ProductQuantity> items,
|
|
|
|
|
required this.orderType,
|
|
|
|
|
this.table,
|
|
|
|
|
}) : _items = items;
|
|
|
|
|
|
|
|
|
|
final List<ProductQuantity> _items;
|
|
|
|
|
@override
|
|
|
|
|
List<ProductQuantity> get items {
|
|
|
|
|
if (_items is EqualUnmodifiableListView) return _items;
|
|
|
|
|
// ignore: implicit_dynamic_type
|
|
|
|
|
return EqualUnmodifiableListView(_items);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
final OrderType orderType;
|
|
|
|
|
@override
|
|
|
|
|
final Table? table;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
|
|
|
return 'OrderFormEvent.createOrder(items: $items, orderType: $orderType, table: $table)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
|
|
|
super.debugFillProperties(properties);
|
|
|
|
|
properties
|
|
|
|
|
..add(DiagnosticsProperty('type', 'OrderFormEvent.createOrder'))
|
|
|
|
|
..add(DiagnosticsProperty('items', items))
|
|
|
|
|
..add(DiagnosticsProperty('orderType', orderType))
|
|
|
|
|
..add(DiagnosticsProperty('table', table));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType &&
|
|
|
|
|
other is _$CreateOrderImpl &&
|
|
|
|
|
const DeepCollectionEquality().equals(other._items, _items) &&
|
|
|
|
|
(identical(other.orderType, orderType) ||
|
|
|
|
|
other.orderType == orderType) &&
|
|
|
|
|
(identical(other.table, table) || other.table == table));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(
|
|
|
|
|
runtimeType,
|
|
|
|
|
const DeepCollectionEquality().hash(_items),
|
|
|
|
|
orderType,
|
|
|
|
|
table,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/// 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')
|
|
|
|
|
_$$CreateOrderImplCopyWith<_$CreateOrderImpl> get copyWith =>
|
|
|
|
|
__$$CreateOrderImplCopyWithImpl<_$CreateOrderImpl>(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,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrder(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@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,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrder?.call(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@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,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (createOrder != null) {
|
|
|
|
|
return createOrder(items, orderType, table);
|
|
|
|
|
}
|
|
|
|
|
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,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrder(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,
|
|
|
|
|
}) {
|
|
|
|
|
return createOrder?.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,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (createOrder != null) {
|
|
|
|
|
return createOrder(this);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _CreateOrder implements OrderFormEvent {
|
|
|
|
|
const factory _CreateOrder({
|
|
|
|
|
required final List<ProductQuantity> items,
|
|
|
|
|
required final OrderType orderType,
|
|
|
|
|
final Table? table,
|
|
|
|
|
}) = _$CreateOrderImpl;
|
|
|
|
|
|
|
|
|
|
List<ProductQuantity> get items;
|
|
|
|
|
OrderType get orderType;
|
|
|
|
|
Table? get table;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
_$$CreateOrderImplCopyWith<_$CreateOrderImpl> get copyWith =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
mixin _$OrderFormState {
|
|
|
|
|
PaymentMethod? get paymentMethod => throw _privateConstructorUsedError;
|
|
|
|
@@ -935,7 +1297,10 @@ mixin _$OrderFormState {
|
|
|
|
|
Customer? get customer => throw _privateConstructorUsedError;
|
|
|
|
|
Option<Either<OrderFailure, Order>> get failureOrCreateOrder =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
Option<Either<OrderFailure, Order>> get failureOrCreateOrderWithPayment =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
bool get isCreating => throw _privateConstructorUsedError;
|
|
|
|
|
bool get isCreatingWithPayment => throw _privateConstructorUsedError;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
@@ -956,7 +1321,9 @@ abstract class $OrderFormStateCopyWith<$Res> {
|
|
|
|
|
String? customerName,
|
|
|
|
|
Customer? customer,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrCreateOrder,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrCreateOrderWithPayment,
|
|
|
|
|
bool isCreating,
|
|
|
|
|
bool isCreatingWithPayment,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$PaymentMethodCopyWith<$Res>? get paymentMethod;
|
|
|
|
@@ -982,7 +1349,9 @@ class _$OrderFormStateCopyWithImpl<$Res, $Val extends OrderFormState>
|
|
|
|
|
Object? customerName = freezed,
|
|
|
|
|
Object? customer = freezed,
|
|
|
|
|
Object? failureOrCreateOrder = null,
|
|
|
|
|
Object? failureOrCreateOrderWithPayment = null,
|
|
|
|
|
Object? isCreating = null,
|
|
|
|
|
Object? isCreatingWithPayment = null,
|
|
|
|
|
}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_value.copyWith(
|
|
|
|
@@ -1002,10 +1371,19 @@ class _$OrderFormStateCopyWithImpl<$Res, $Val extends OrderFormState>
|
|
|
|
|
? _value.failureOrCreateOrder
|
|
|
|
|
: failureOrCreateOrder // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Order>>,
|
|
|
|
|
failureOrCreateOrderWithPayment:
|
|
|
|
|
null == failureOrCreateOrderWithPayment
|
|
|
|
|
? _value.failureOrCreateOrderWithPayment
|
|
|
|
|
: failureOrCreateOrderWithPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Order>>,
|
|
|
|
|
isCreating: null == isCreating
|
|
|
|
|
? _value.isCreating
|
|
|
|
|
: isCreating // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
isCreatingWithPayment: null == isCreatingWithPayment
|
|
|
|
|
? _value.isCreatingWithPayment
|
|
|
|
|
: isCreatingWithPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
)
|
|
|
|
|
as $Val,
|
|
|
|
|
);
|
|
|
|
@@ -1054,7 +1432,9 @@ abstract class _$$OrderFormStateImplCopyWith<$Res>
|
|
|
|
|
String? customerName,
|
|
|
|
|
Customer? customer,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrCreateOrder,
|
|
|
|
|
Option<Either<OrderFailure, Order>> failureOrCreateOrderWithPayment,
|
|
|
|
|
bool isCreating,
|
|
|
|
|
bool isCreatingWithPayment,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1081,7 +1461,9 @@ class __$$OrderFormStateImplCopyWithImpl<$Res>
|
|
|
|
|
Object? customerName = freezed,
|
|
|
|
|
Object? customer = freezed,
|
|
|
|
|
Object? failureOrCreateOrder = null,
|
|
|
|
|
Object? failureOrCreateOrderWithPayment = null,
|
|
|
|
|
Object? isCreating = null,
|
|
|
|
|
Object? isCreatingWithPayment = null,
|
|
|
|
|
}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_$OrderFormStateImpl(
|
|
|
|
@@ -1101,10 +1483,18 @@ class __$$OrderFormStateImplCopyWithImpl<$Res>
|
|
|
|
|
? _value.failureOrCreateOrder
|
|
|
|
|
: failureOrCreateOrder // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Order>>,
|
|
|
|
|
failureOrCreateOrderWithPayment: null == failureOrCreateOrderWithPayment
|
|
|
|
|
? _value.failureOrCreateOrderWithPayment
|
|
|
|
|
: failureOrCreateOrderWithPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Order>>,
|
|
|
|
|
isCreating: null == isCreating
|
|
|
|
|
? _value.isCreating
|
|
|
|
|
: isCreating // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
isCreatingWithPayment: null == isCreatingWithPayment
|
|
|
|
|
? _value.isCreatingWithPayment
|
|
|
|
|
: isCreatingWithPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@@ -1120,7 +1510,9 @@ class _$OrderFormStateImpl
|
|
|
|
|
this.customerName,
|
|
|
|
|
this.customer,
|
|
|
|
|
required this.failureOrCreateOrder,
|
|
|
|
|
required this.failureOrCreateOrderWithPayment,
|
|
|
|
|
this.isCreating = false,
|
|
|
|
|
this.isCreatingWithPayment = false,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1132,12 +1524,17 @@ class _$OrderFormStateImpl
|
|
|
|
|
@override
|
|
|
|
|
final Option<Either<OrderFailure, Order>> failureOrCreateOrder;
|
|
|
|
|
@override
|
|
|
|
|
final Option<Either<OrderFailure, Order>> failureOrCreateOrderWithPayment;
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey()
|
|
|
|
|
final bool isCreating;
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey()
|
|
|
|
|
final bool isCreatingWithPayment;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
|
|
|
return 'OrderFormState(paymentMethod: $paymentMethod, customerName: $customerName, customer: $customer, failureOrCreateOrder: $failureOrCreateOrder, isCreating: $isCreating)';
|
|
|
|
|
return 'OrderFormState(paymentMethod: $paymentMethod, customerName: $customerName, customer: $customer, failureOrCreateOrder: $failureOrCreateOrder, failureOrCreateOrderWithPayment: $failureOrCreateOrderWithPayment, isCreating: $isCreating, isCreatingWithPayment: $isCreatingWithPayment)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1149,7 +1546,16 @@ class _$OrderFormStateImpl
|
|
|
|
|
..add(DiagnosticsProperty('customerName', customerName))
|
|
|
|
|
..add(DiagnosticsProperty('customer', customer))
|
|
|
|
|
..add(DiagnosticsProperty('failureOrCreateOrder', failureOrCreateOrder))
|
|
|
|
|
..add(DiagnosticsProperty('isCreating', isCreating));
|
|
|
|
|
..add(
|
|
|
|
|
DiagnosticsProperty(
|
|
|
|
|
'failureOrCreateOrderWithPayment',
|
|
|
|
|
failureOrCreateOrderWithPayment,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
..add(DiagnosticsProperty('isCreating', isCreating))
|
|
|
|
|
..add(
|
|
|
|
|
DiagnosticsProperty('isCreatingWithPayment', isCreatingWithPayment),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1165,8 +1571,16 @@ class _$OrderFormStateImpl
|
|
|
|
|
other.customer == customer) &&
|
|
|
|
|
(identical(other.failureOrCreateOrder, failureOrCreateOrder) ||
|
|
|
|
|
other.failureOrCreateOrder == failureOrCreateOrder) &&
|
|
|
|
|
(identical(
|
|
|
|
|
other.failureOrCreateOrderWithPayment,
|
|
|
|
|
failureOrCreateOrderWithPayment,
|
|
|
|
|
) ||
|
|
|
|
|
other.failureOrCreateOrderWithPayment ==
|
|
|
|
|
failureOrCreateOrderWithPayment) &&
|
|
|
|
|
(identical(other.isCreating, isCreating) ||
|
|
|
|
|
other.isCreating == isCreating));
|
|
|
|
|
other.isCreating == isCreating) &&
|
|
|
|
|
(identical(other.isCreatingWithPayment, isCreatingWithPayment) ||
|
|
|
|
|
other.isCreatingWithPayment == isCreatingWithPayment));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1176,7 +1590,9 @@ class _$OrderFormStateImpl
|
|
|
|
|
customerName,
|
|
|
|
|
customer,
|
|
|
|
|
failureOrCreateOrder,
|
|
|
|
|
failureOrCreateOrderWithPayment,
|
|
|
|
|
isCreating,
|
|
|
|
|
isCreatingWithPayment,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormState
|
|
|
|
@@ -1197,7 +1613,10 @@ abstract class _OrderFormState implements OrderFormState {
|
|
|
|
|
final String? customerName,
|
|
|
|
|
final Customer? customer,
|
|
|
|
|
required final Option<Either<OrderFailure, Order>> failureOrCreateOrder,
|
|
|
|
|
required final Option<Either<OrderFailure, Order>>
|
|
|
|
|
failureOrCreateOrderWithPayment,
|
|
|
|
|
final bool isCreating,
|
|
|
|
|
final bool isCreatingWithPayment,
|
|
|
|
|
}) = _$OrderFormStateImpl;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@@ -1209,7 +1628,11 @@ abstract class _OrderFormState implements OrderFormState {
|
|
|
|
|
@override
|
|
|
|
|
Option<Either<OrderFailure, Order>> get failureOrCreateOrder;
|
|
|
|
|
@override
|
|
|
|
|
Option<Either<OrderFailure, Order>> get failureOrCreateOrderWithPayment;
|
|
|
|
|
@override
|
|
|
|
|
bool get isCreating;
|
|
|
|
|
@override
|
|
|
|
|
bool get isCreatingWithPayment;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of OrderFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|