|
|
|
@@ -0,0 +1,795 @@
|
|
|
|
|
// 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 'payment_form_bloc.dart';
|
|
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
|
// FreezedGenerator
|
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
|
|
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
|
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
mixin _$PaymentFormEvent {
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function(Order order) setOrder,
|
|
|
|
|
required TResult Function(PaymentMethod paymentMethod) setPaymentMethod,
|
|
|
|
|
required TResult Function() submitted,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(Order order)? setOrder,
|
|
|
|
|
TResult? Function(PaymentMethod paymentMethod)? setPaymentMethod,
|
|
|
|
|
TResult? Function()? submitted,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function(Order order)? setOrder,
|
|
|
|
|
TResult Function(PaymentMethod paymentMethod)? setPaymentMethod,
|
|
|
|
|
TResult Function()? submitted,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_SetOrder value) setOrder,
|
|
|
|
|
required TResult Function(_SetPayment value) setPaymentMethod,
|
|
|
|
|
required TResult Function(_Submitted value) submitted,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_SetOrder value)? setOrder,
|
|
|
|
|
TResult? Function(_SetPayment value)? setPaymentMethod,
|
|
|
|
|
TResult? Function(_Submitted value)? submitted,
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_SetOrder value)? setOrder,
|
|
|
|
|
TResult Function(_SetPayment value)? setPaymentMethod,
|
|
|
|
|
TResult Function(_Submitted value)? submitted,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) => throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class $PaymentFormEventCopyWith<$Res> {
|
|
|
|
|
factory $PaymentFormEventCopyWith(
|
|
|
|
|
PaymentFormEvent value,
|
|
|
|
|
$Res Function(PaymentFormEvent) then,
|
|
|
|
|
) = _$PaymentFormEventCopyWithImpl<$Res, PaymentFormEvent>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class _$PaymentFormEventCopyWithImpl<$Res, $Val extends PaymentFormEvent>
|
|
|
|
|
implements $PaymentFormEventCopyWith<$Res> {
|
|
|
|
|
_$PaymentFormEventCopyWithImpl(this._value, this._then);
|
|
|
|
|
|
|
|
|
|
// ignore: unused_field
|
|
|
|
|
final $Val _value;
|
|
|
|
|
// ignore: unused_field
|
|
|
|
|
final $Res Function($Val) _then;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$SetOrderImplCopyWith<$Res> {
|
|
|
|
|
factory _$$SetOrderImplCopyWith(
|
|
|
|
|
_$SetOrderImpl value,
|
|
|
|
|
$Res Function(_$SetOrderImpl) then,
|
|
|
|
|
) = __$$SetOrderImplCopyWithImpl<$Res>;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({Order order});
|
|
|
|
|
|
|
|
|
|
$OrderCopyWith<$Res> get order;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$SetOrderImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$PaymentFormEventCopyWithImpl<$Res, _$SetOrderImpl>
|
|
|
|
|
implements _$$SetOrderImplCopyWith<$Res> {
|
|
|
|
|
__$$SetOrderImplCopyWithImpl(
|
|
|
|
|
_$SetOrderImpl _value,
|
|
|
|
|
$Res Function(_$SetOrderImpl) _then,
|
|
|
|
|
) : super(_value, _then);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
@override
|
|
|
|
|
$Res call({Object? order = null}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_$SetOrderImpl(
|
|
|
|
|
null == order
|
|
|
|
|
? _value.order
|
|
|
|
|
: order // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Order,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
$OrderCopyWith<$Res> get order {
|
|
|
|
|
return $OrderCopyWith<$Res>(_value.order, (value) {
|
|
|
|
|
return _then(_value.copyWith(order: value));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$SetOrderImpl implements _SetOrder {
|
|
|
|
|
const _$SetOrderImpl(this.order);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
final Order order;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'PaymentFormEvent.setOrder(order: $order)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType &&
|
|
|
|
|
other is _$SetOrderImpl &&
|
|
|
|
|
(identical(other.order, order) || other.order == order));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(runtimeType, order);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
_$$SetOrderImplCopyWith<_$SetOrderImpl> get copyWith =>
|
|
|
|
|
__$$SetOrderImplCopyWithImpl<_$SetOrderImpl>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function(Order order) setOrder,
|
|
|
|
|
required TResult Function(PaymentMethod paymentMethod) setPaymentMethod,
|
|
|
|
|
required TResult Function() submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return setOrder(order);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(Order order)? setOrder,
|
|
|
|
|
TResult? Function(PaymentMethod paymentMethod)? setPaymentMethod,
|
|
|
|
|
TResult? Function()? submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return setOrder?.call(order);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function(Order order)? setOrder,
|
|
|
|
|
TResult Function(PaymentMethod paymentMethod)? setPaymentMethod,
|
|
|
|
|
TResult Function()? submitted,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (setOrder != null) {
|
|
|
|
|
return setOrder(order);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_SetOrder value) setOrder,
|
|
|
|
|
required TResult Function(_SetPayment value) setPaymentMethod,
|
|
|
|
|
required TResult Function(_Submitted value) submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return setOrder(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_SetOrder value)? setOrder,
|
|
|
|
|
TResult? Function(_SetPayment value)? setPaymentMethod,
|
|
|
|
|
TResult? Function(_Submitted value)? submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return setOrder?.call(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_SetOrder value)? setOrder,
|
|
|
|
|
TResult Function(_SetPayment value)? setPaymentMethod,
|
|
|
|
|
TResult Function(_Submitted value)? submitted,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (setOrder != null) {
|
|
|
|
|
return setOrder(this);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _SetOrder implements PaymentFormEvent {
|
|
|
|
|
const factory _SetOrder(final Order order) = _$SetOrderImpl;
|
|
|
|
|
|
|
|
|
|
Order get order;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
_$$SetOrderImplCopyWith<_$SetOrderImpl> get copyWith =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$SetPaymentImplCopyWith<$Res> {
|
|
|
|
|
factory _$$SetPaymentImplCopyWith(
|
|
|
|
|
_$SetPaymentImpl value,
|
|
|
|
|
$Res Function(_$SetPaymentImpl) then,
|
|
|
|
|
) = __$$SetPaymentImplCopyWithImpl<$Res>;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({PaymentMethod paymentMethod});
|
|
|
|
|
|
|
|
|
|
$PaymentMethodCopyWith<$Res> get paymentMethod;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$SetPaymentImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$PaymentFormEventCopyWithImpl<$Res, _$SetPaymentImpl>
|
|
|
|
|
implements _$$SetPaymentImplCopyWith<$Res> {
|
|
|
|
|
__$$SetPaymentImplCopyWithImpl(
|
|
|
|
|
_$SetPaymentImpl _value,
|
|
|
|
|
$Res Function(_$SetPaymentImpl) _then,
|
|
|
|
|
) : super(_value, _then);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
@override
|
|
|
|
|
$Res call({Object? paymentMethod = null}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_$SetPaymentImpl(
|
|
|
|
|
null == paymentMethod
|
|
|
|
|
? _value.paymentMethod
|
|
|
|
|
: paymentMethod // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as PaymentMethod,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
$PaymentMethodCopyWith<$Res> get paymentMethod {
|
|
|
|
|
return $PaymentMethodCopyWith<$Res>(_value.paymentMethod, (value) {
|
|
|
|
|
return _then(_value.copyWith(paymentMethod: value));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$SetPaymentImpl implements _SetPayment {
|
|
|
|
|
const _$SetPaymentImpl(this.paymentMethod);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
final PaymentMethod paymentMethod;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'PaymentFormEvent.setPaymentMethod(paymentMethod: $paymentMethod)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType &&
|
|
|
|
|
other is _$SetPaymentImpl &&
|
|
|
|
|
(identical(other.paymentMethod, paymentMethod) ||
|
|
|
|
|
other.paymentMethod == paymentMethod));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(runtimeType, paymentMethod);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
_$$SetPaymentImplCopyWith<_$SetPaymentImpl> get copyWith =>
|
|
|
|
|
__$$SetPaymentImplCopyWithImpl<_$SetPaymentImpl>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function(Order order) setOrder,
|
|
|
|
|
required TResult Function(PaymentMethod paymentMethod) setPaymentMethod,
|
|
|
|
|
required TResult Function() submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return setPaymentMethod(paymentMethod);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(Order order)? setOrder,
|
|
|
|
|
TResult? Function(PaymentMethod paymentMethod)? setPaymentMethod,
|
|
|
|
|
TResult? Function()? submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return setPaymentMethod?.call(paymentMethod);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function(Order order)? setOrder,
|
|
|
|
|
TResult Function(PaymentMethod paymentMethod)? setPaymentMethod,
|
|
|
|
|
TResult Function()? submitted,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (setPaymentMethod != null) {
|
|
|
|
|
return setPaymentMethod(paymentMethod);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_SetOrder value) setOrder,
|
|
|
|
|
required TResult Function(_SetPayment value) setPaymentMethod,
|
|
|
|
|
required TResult Function(_Submitted value) submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return setPaymentMethod(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_SetOrder value)? setOrder,
|
|
|
|
|
TResult? Function(_SetPayment value)? setPaymentMethod,
|
|
|
|
|
TResult? Function(_Submitted value)? submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return setPaymentMethod?.call(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_SetOrder value)? setOrder,
|
|
|
|
|
TResult Function(_SetPayment value)? setPaymentMethod,
|
|
|
|
|
TResult Function(_Submitted value)? submitted,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (setPaymentMethod != null) {
|
|
|
|
|
return setPaymentMethod(this);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _SetPayment implements PaymentFormEvent {
|
|
|
|
|
const factory _SetPayment(final PaymentMethod paymentMethod) =
|
|
|
|
|
_$SetPaymentImpl;
|
|
|
|
|
|
|
|
|
|
PaymentMethod get paymentMethod;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
_$$SetPaymentImplCopyWith<_$SetPaymentImpl> get copyWith =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$SubmittedImplCopyWith<$Res> {
|
|
|
|
|
factory _$$SubmittedImplCopyWith(
|
|
|
|
|
_$SubmittedImpl value,
|
|
|
|
|
$Res Function(_$SubmittedImpl) then,
|
|
|
|
|
) = __$$SubmittedImplCopyWithImpl<$Res>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$SubmittedImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$PaymentFormEventCopyWithImpl<$Res, _$SubmittedImpl>
|
|
|
|
|
implements _$$SubmittedImplCopyWith<$Res> {
|
|
|
|
|
__$$SubmittedImplCopyWithImpl(
|
|
|
|
|
_$SubmittedImpl _value,
|
|
|
|
|
$Res Function(_$SubmittedImpl) _then,
|
|
|
|
|
) : super(_value, _then);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$SubmittedImpl implements _Submitted {
|
|
|
|
|
const _$SubmittedImpl();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'PaymentFormEvent.submitted()';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType && other is _$SubmittedImpl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function(Order order) setOrder,
|
|
|
|
|
required TResult Function(PaymentMethod paymentMethod) setPaymentMethod,
|
|
|
|
|
required TResult Function() submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return submitted();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(Order order)? setOrder,
|
|
|
|
|
TResult? Function(PaymentMethod paymentMethod)? setPaymentMethod,
|
|
|
|
|
TResult? Function()? submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return submitted?.call();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function(Order order)? setOrder,
|
|
|
|
|
TResult Function(PaymentMethod paymentMethod)? setPaymentMethod,
|
|
|
|
|
TResult Function()? submitted,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (submitted != null) {
|
|
|
|
|
return submitted();
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_SetOrder value) setOrder,
|
|
|
|
|
required TResult Function(_SetPayment value) setPaymentMethod,
|
|
|
|
|
required TResult Function(_Submitted value) submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return submitted(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_SetOrder value)? setOrder,
|
|
|
|
|
TResult? Function(_SetPayment value)? setPaymentMethod,
|
|
|
|
|
TResult? Function(_Submitted value)? submitted,
|
|
|
|
|
}) {
|
|
|
|
|
return submitted?.call(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_SetOrder value)? setOrder,
|
|
|
|
|
TResult Function(_SetPayment value)? setPaymentMethod,
|
|
|
|
|
TResult Function(_Submitted value)? submitted,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (submitted != null) {
|
|
|
|
|
return submitted(this);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _Submitted implements PaymentFormEvent {
|
|
|
|
|
const factory _Submitted() = _$SubmittedImpl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
mixin _$PaymentFormState {
|
|
|
|
|
Order get order => throw _privateConstructorUsedError;
|
|
|
|
|
List<OrderItem> get pendingItems => throw _privateConstructorUsedError;
|
|
|
|
|
Option<Either<OrderFailure, Payment>> get failureOrPayment =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
PaymentMethod? get paymentMethod => throw _privateConstructorUsedError;
|
|
|
|
|
bool get isSubmitting => throw _privateConstructorUsedError;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
$PaymentFormStateCopyWith<PaymentFormState> get copyWith =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class $PaymentFormStateCopyWith<$Res> {
|
|
|
|
|
factory $PaymentFormStateCopyWith(
|
|
|
|
|
PaymentFormState value,
|
|
|
|
|
$Res Function(PaymentFormState) then,
|
|
|
|
|
) = _$PaymentFormStateCopyWithImpl<$Res, PaymentFormState>;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({
|
|
|
|
|
Order order,
|
|
|
|
|
List<OrderItem> pendingItems,
|
|
|
|
|
Option<Either<OrderFailure, Payment>> failureOrPayment,
|
|
|
|
|
PaymentMethod? paymentMethod,
|
|
|
|
|
bool isSubmitting,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$OrderCopyWith<$Res> get order;
|
|
|
|
|
$PaymentMethodCopyWith<$Res>? get paymentMethod;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class _$PaymentFormStateCopyWithImpl<$Res, $Val extends PaymentFormState>
|
|
|
|
|
implements $PaymentFormStateCopyWith<$Res> {
|
|
|
|
|
_$PaymentFormStateCopyWithImpl(this._value, this._then);
|
|
|
|
|
|
|
|
|
|
// ignore: unused_field
|
|
|
|
|
final $Val _value;
|
|
|
|
|
// ignore: unused_field
|
|
|
|
|
final $Res Function($Val) _then;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
@override
|
|
|
|
|
$Res call({
|
|
|
|
|
Object? order = null,
|
|
|
|
|
Object? pendingItems = null,
|
|
|
|
|
Object? failureOrPayment = null,
|
|
|
|
|
Object? paymentMethod = freezed,
|
|
|
|
|
Object? isSubmitting = null,
|
|
|
|
|
}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_value.copyWith(
|
|
|
|
|
order: null == order
|
|
|
|
|
? _value.order
|
|
|
|
|
: order // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Order,
|
|
|
|
|
pendingItems: null == pendingItems
|
|
|
|
|
? _value.pendingItems
|
|
|
|
|
: pendingItems // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as List<OrderItem>,
|
|
|
|
|
failureOrPayment: null == failureOrPayment
|
|
|
|
|
? _value.failureOrPayment
|
|
|
|
|
: failureOrPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Payment>>,
|
|
|
|
|
paymentMethod: freezed == paymentMethod
|
|
|
|
|
? _value.paymentMethod
|
|
|
|
|
: paymentMethod // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as PaymentMethod?,
|
|
|
|
|
isSubmitting: null == isSubmitting
|
|
|
|
|
? _value.isSubmitting
|
|
|
|
|
: isSubmitting // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
)
|
|
|
|
|
as $Val,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
$OrderCopyWith<$Res> get order {
|
|
|
|
|
return $OrderCopyWith<$Res>(_value.order, (value) {
|
|
|
|
|
return _then(_value.copyWith(order: value) as $Val);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
$PaymentMethodCopyWith<$Res>? get paymentMethod {
|
|
|
|
|
if (_value.paymentMethod == null) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $PaymentMethodCopyWith<$Res>(_value.paymentMethod!, (value) {
|
|
|
|
|
return _then(_value.copyWith(paymentMethod: value) as $Val);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$PaymentFormStateImplCopyWith<$Res>
|
|
|
|
|
implements $PaymentFormStateCopyWith<$Res> {
|
|
|
|
|
factory _$$PaymentFormStateImplCopyWith(
|
|
|
|
|
_$PaymentFormStateImpl value,
|
|
|
|
|
$Res Function(_$PaymentFormStateImpl) then,
|
|
|
|
|
) = __$$PaymentFormStateImplCopyWithImpl<$Res>;
|
|
|
|
|
@override
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({
|
|
|
|
|
Order order,
|
|
|
|
|
List<OrderItem> pendingItems,
|
|
|
|
|
Option<Either<OrderFailure, Payment>> failureOrPayment,
|
|
|
|
|
PaymentMethod? paymentMethod,
|
|
|
|
|
bool isSubmitting,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
$OrderCopyWith<$Res> get order;
|
|
|
|
|
@override
|
|
|
|
|
$PaymentMethodCopyWith<$Res>? get paymentMethod;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$PaymentFormStateImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$PaymentFormStateCopyWithImpl<$Res, _$PaymentFormStateImpl>
|
|
|
|
|
implements _$$PaymentFormStateImplCopyWith<$Res> {
|
|
|
|
|
__$$PaymentFormStateImplCopyWithImpl(
|
|
|
|
|
_$PaymentFormStateImpl _value,
|
|
|
|
|
$Res Function(_$PaymentFormStateImpl) _then,
|
|
|
|
|
) : super(_value, _then);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
@override
|
|
|
|
|
$Res call({
|
|
|
|
|
Object? order = null,
|
|
|
|
|
Object? pendingItems = null,
|
|
|
|
|
Object? failureOrPayment = null,
|
|
|
|
|
Object? paymentMethod = freezed,
|
|
|
|
|
Object? isSubmitting = null,
|
|
|
|
|
}) {
|
|
|
|
|
return _then(
|
|
|
|
|
_$PaymentFormStateImpl(
|
|
|
|
|
order: null == order
|
|
|
|
|
? _value.order
|
|
|
|
|
: order // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Order,
|
|
|
|
|
pendingItems: null == pendingItems
|
|
|
|
|
? _value._pendingItems
|
|
|
|
|
: pendingItems // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as List<OrderItem>,
|
|
|
|
|
failureOrPayment: null == failureOrPayment
|
|
|
|
|
? _value.failureOrPayment
|
|
|
|
|
: failureOrPayment // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Option<Either<OrderFailure, Payment>>,
|
|
|
|
|
paymentMethod: freezed == paymentMethod
|
|
|
|
|
? _value.paymentMethod
|
|
|
|
|
: paymentMethod // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as PaymentMethod?,
|
|
|
|
|
isSubmitting: null == isSubmitting
|
|
|
|
|
? _value.isSubmitting
|
|
|
|
|
: isSubmitting // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$PaymentFormStateImpl implements _PaymentFormState {
|
|
|
|
|
_$PaymentFormStateImpl({
|
|
|
|
|
required this.order,
|
|
|
|
|
required final List<OrderItem> pendingItems,
|
|
|
|
|
required this.failureOrPayment,
|
|
|
|
|
this.paymentMethod,
|
|
|
|
|
this.isSubmitting = false,
|
|
|
|
|
}) : _pendingItems = pendingItems;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
final Order order;
|
|
|
|
|
final List<OrderItem> _pendingItems;
|
|
|
|
|
@override
|
|
|
|
|
List<OrderItem> get pendingItems {
|
|
|
|
|
if (_pendingItems is EqualUnmodifiableListView) return _pendingItems;
|
|
|
|
|
// ignore: implicit_dynamic_type
|
|
|
|
|
return EqualUnmodifiableListView(_pendingItems);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
final Option<Either<OrderFailure, Payment>> failureOrPayment;
|
|
|
|
|
@override
|
|
|
|
|
final PaymentMethod? paymentMethod;
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey()
|
|
|
|
|
final bool isSubmitting;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'PaymentFormState(order: $order, pendingItems: $pendingItems, failureOrPayment: $failureOrPayment, paymentMethod: $paymentMethod, isSubmitting: $isSubmitting)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType &&
|
|
|
|
|
other is _$PaymentFormStateImpl &&
|
|
|
|
|
(identical(other.order, order) || other.order == order) &&
|
|
|
|
|
const DeepCollectionEquality().equals(
|
|
|
|
|
other._pendingItems,
|
|
|
|
|
_pendingItems,
|
|
|
|
|
) &&
|
|
|
|
|
(identical(other.failureOrPayment, failureOrPayment) ||
|
|
|
|
|
other.failureOrPayment == failureOrPayment) &&
|
|
|
|
|
(identical(other.paymentMethod, paymentMethod) ||
|
|
|
|
|
other.paymentMethod == paymentMethod) &&
|
|
|
|
|
(identical(other.isSubmitting, isSubmitting) ||
|
|
|
|
|
other.isSubmitting == isSubmitting));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(
|
|
|
|
|
runtimeType,
|
|
|
|
|
order,
|
|
|
|
|
const DeepCollectionEquality().hash(_pendingItems),
|
|
|
|
|
failureOrPayment,
|
|
|
|
|
paymentMethod,
|
|
|
|
|
isSubmitting,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
_$$PaymentFormStateImplCopyWith<_$PaymentFormStateImpl> get copyWith =>
|
|
|
|
|
__$$PaymentFormStateImplCopyWithImpl<_$PaymentFormStateImpl>(
|
|
|
|
|
this,
|
|
|
|
|
_$identity,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _PaymentFormState implements PaymentFormState {
|
|
|
|
|
factory _PaymentFormState({
|
|
|
|
|
required final Order order,
|
|
|
|
|
required final List<OrderItem> pendingItems,
|
|
|
|
|
required final Option<Either<OrderFailure, Payment>> failureOrPayment,
|
|
|
|
|
final PaymentMethod? paymentMethod,
|
|
|
|
|
final bool isSubmitting,
|
|
|
|
|
}) = _$PaymentFormStateImpl;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Order get order;
|
|
|
|
|
@override
|
|
|
|
|
List<OrderItem> get pendingItems;
|
|
|
|
|
@override
|
|
|
|
|
Option<Either<OrderFailure, Payment>> get failureOrPayment;
|
|
|
|
|
@override
|
|
|
|
|
PaymentMethod? get paymentMethod;
|
|
|
|
|
@override
|
|
|
|
|
bool get isSubmitting;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of PaymentFormState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
_$$PaymentFormStateImplCopyWith<_$PaymentFormStateImpl> get copyWith =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
}
|