apskel-pos-flutter-v2/lib/application/printer/print_struck/print_struck_bloc.freezed.dart

746 lines
21 KiB
Dart
Raw Normal View History

2025-11-07 16:29:26 +07:00
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'print_struck_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 _$PrintStruckEvent {
Order get order => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(Order order) order,
2025-11-07 17:08:57 +07:00
required TResult Function(Order order) cashier,
required TResult Function(Order order) payment,
2025-11-07 16:29:26 +07:00
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(Order order)? order,
2025-11-07 17:08:57 +07:00
TResult? Function(Order order)? cashier,
TResult? Function(Order order)? payment,
2025-11-07 16:29:26 +07:00
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(Order order)? order,
2025-11-07 17:08:57 +07:00
TResult Function(Order order)? cashier,
TResult Function(Order order)? payment,
2025-11-07 16:29:26 +07:00
required TResult orElse(),
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_Order value) order,
2025-11-07 17:08:57 +07:00
required TResult Function(_Cashier value) cashier,
required TResult Function(_Payment value) payment,
2025-11-07 16:29:26 +07:00
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_Order value)? order,
2025-11-07 17:08:57 +07:00
TResult? Function(_Cashier value)? cashier,
TResult? Function(_Payment value)? payment,
2025-11-07 16:29:26 +07:00
}) => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_Order value)? order,
2025-11-07 17:08:57 +07:00
TResult Function(_Cashier value)? cashier,
TResult Function(_Payment value)? payment,
2025-11-07 16:29:26 +07:00
required TResult orElse(),
}) => throw _privateConstructorUsedError;
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PrintStruckEventCopyWith<PrintStruckEvent> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PrintStruckEventCopyWith<$Res> {
factory $PrintStruckEventCopyWith(
PrintStruckEvent value,
$Res Function(PrintStruckEvent) then,
) = _$PrintStruckEventCopyWithImpl<$Res, PrintStruckEvent>;
@useResult
$Res call({Order order});
$OrderCopyWith<$Res> get order;
}
/// @nodoc
class _$PrintStruckEventCopyWithImpl<$Res, $Val extends PrintStruckEvent>
implements $PrintStruckEventCopyWith<$Res> {
_$PrintStruckEventCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? order = null}) {
return _then(
_value.copyWith(
order: null == order
? _value.order
: order // ignore: cast_nullable_to_non_nullable
as Order,
)
as $Val,
);
}
/// Create a copy of PrintStruckEvent
/// 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);
});
}
}
/// @nodoc
abstract class _$$OrderImplCopyWith<$Res>
implements $PrintStruckEventCopyWith<$Res> {
factory _$$OrderImplCopyWith(
_$OrderImpl value,
$Res Function(_$OrderImpl) then,
) = __$$OrderImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({Order order});
@override
$OrderCopyWith<$Res> get order;
}
/// @nodoc
class __$$OrderImplCopyWithImpl<$Res>
extends _$PrintStruckEventCopyWithImpl<$Res, _$OrderImpl>
implements _$$OrderImplCopyWith<$Res> {
__$$OrderImplCopyWithImpl(
_$OrderImpl _value,
$Res Function(_$OrderImpl) _then,
) : super(_value, _then);
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? order = null}) {
return _then(
_$OrderImpl(
null == order
? _value.order
: order // ignore: cast_nullable_to_non_nullable
as Order,
),
);
}
}
/// @nodoc
class _$OrderImpl implements _Order {
const _$OrderImpl(this.order);
@override
final Order order;
@override
String toString() {
return 'PrintStruckEvent.order(order: $order)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$OrderImpl &&
(identical(other.order, order) || other.order == order));
}
@override
int get hashCode => Object.hash(runtimeType, order);
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$OrderImplCopyWith<_$OrderImpl> get copyWith =>
__$$OrderImplCopyWithImpl<_$OrderImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(Order order) order,
2025-11-07 17:08:57 +07:00
required TResult Function(Order order) cashier,
required TResult Function(Order order) payment,
2025-11-07 16:29:26 +07:00
}) {
return order(this.order);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(Order order)? order,
2025-11-07 17:08:57 +07:00
TResult? Function(Order order)? cashier,
TResult? Function(Order order)? payment,
2025-11-07 16:29:26 +07:00
}) {
return order?.call(this.order);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(Order order)? order,
2025-11-07 17:08:57 +07:00
TResult Function(Order order)? cashier,
TResult Function(Order order)? payment,
2025-11-07 16:29:26 +07:00
required TResult orElse(),
}) {
if (order != null) {
return order(this.order);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_Order value) order,
2025-11-07 17:08:57 +07:00
required TResult Function(_Cashier value) cashier,
required TResult Function(_Payment value) payment,
2025-11-07 16:29:26 +07:00
}) {
return order(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_Order value)? order,
2025-11-07 17:08:57 +07:00
TResult? Function(_Cashier value)? cashier,
TResult? Function(_Payment value)? payment,
2025-11-07 16:29:26 +07:00
}) {
return order?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_Order value)? order,
2025-11-07 17:08:57 +07:00
TResult Function(_Cashier value)? cashier,
TResult Function(_Payment value)? payment,
2025-11-07 16:29:26 +07:00
required TResult orElse(),
}) {
if (order != null) {
return order(this);
}
return orElse();
}
}
abstract class _Order implements PrintStruckEvent {
const factory _Order(final Order order) = _$OrderImpl;
@override
Order get order;
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$OrderImplCopyWith<_$OrderImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
2025-11-07 17:08:57 +07:00
abstract class _$$CashierImplCopyWith<$Res>
2025-11-07 16:29:26 +07:00
implements $PrintStruckEventCopyWith<$Res> {
2025-11-07 17:08:57 +07:00
factory _$$CashierImplCopyWith(
_$CashierImpl value,
$Res Function(_$CashierImpl) then,
) = __$$CashierImplCopyWithImpl<$Res>;
2025-11-07 16:29:26 +07:00
@override
@useResult
$Res call({Order order});
@override
$OrderCopyWith<$Res> get order;
}
/// @nodoc
2025-11-07 17:08:57 +07:00
class __$$CashierImplCopyWithImpl<$Res>
extends _$PrintStruckEventCopyWithImpl<$Res, _$CashierImpl>
implements _$$CashierImplCopyWith<$Res> {
__$$CashierImplCopyWithImpl(
_$CashierImpl _value,
$Res Function(_$CashierImpl) _then,
2025-11-07 16:29:26 +07:00
) : super(_value, _then);
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? order = null}) {
return _then(
2025-11-07 17:08:57 +07:00
_$CashierImpl(
2025-11-07 16:29:26 +07:00
null == order
? _value.order
: order // ignore: cast_nullable_to_non_nullable
as Order,
),
);
}
}
/// @nodoc
2025-11-07 17:08:57 +07:00
class _$CashierImpl implements _Cashier {
const _$CashierImpl(this.order);
2025-11-07 16:29:26 +07:00
@override
final Order order;
@override
String toString() {
2025-11-07 17:08:57 +07:00
return 'PrintStruckEvent.cashier(order: $order)';
2025-11-07 16:29:26 +07:00
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2025-11-07 17:08:57 +07:00
other is _$CashierImpl &&
2025-11-07 16:29:26 +07:00
(identical(other.order, order) || other.order == order));
}
@override
int get hashCode => Object.hash(runtimeType, order);
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
2025-11-07 17:08:57 +07:00
_$$CashierImplCopyWith<_$CashierImpl> get copyWith =>
__$$CashierImplCopyWithImpl<_$CashierImpl>(this, _$identity);
2025-11-07 16:29:26 +07:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(Order order) order,
2025-11-07 17:08:57 +07:00
required TResult Function(Order order) cashier,
required TResult Function(Order order) payment,
2025-11-07 16:29:26 +07:00
}) {
2025-11-07 17:08:57 +07:00
return cashier(this.order);
2025-11-07 16:29:26 +07:00
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(Order order)? order,
2025-11-07 17:08:57 +07:00
TResult? Function(Order order)? cashier,
TResult? Function(Order order)? payment,
2025-11-07 16:29:26 +07:00
}) {
2025-11-07 17:08:57 +07:00
return cashier?.call(this.order);
2025-11-07 16:29:26 +07:00
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(Order order)? order,
2025-11-07 17:08:57 +07:00
TResult Function(Order order)? cashier,
TResult Function(Order order)? payment,
2025-11-07 16:29:26 +07:00
required TResult orElse(),
}) {
2025-11-07 17:08:57 +07:00
if (cashier != null) {
return cashier(this.order);
2025-11-07 16:29:26 +07:00
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_Order value) order,
2025-11-07 17:08:57 +07:00
required TResult Function(_Cashier value) cashier,
required TResult Function(_Payment value) payment,
2025-11-07 16:29:26 +07:00
}) {
2025-11-07 17:08:57 +07:00
return cashier(this);
2025-11-07 16:29:26 +07:00
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_Order value)? order,
2025-11-07 17:08:57 +07:00
TResult? Function(_Cashier value)? cashier,
TResult? Function(_Payment value)? payment,
2025-11-07 16:29:26 +07:00
}) {
2025-11-07 17:08:57 +07:00
return cashier?.call(this);
2025-11-07 16:29:26 +07:00
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_Order value)? order,
2025-11-07 17:08:57 +07:00
TResult Function(_Cashier value)? cashier,
TResult Function(_Payment value)? payment,
2025-11-07 16:29:26 +07:00
required TResult orElse(),
}) {
2025-11-07 17:08:57 +07:00
if (cashier != null) {
return cashier(this);
2025-11-07 16:29:26 +07:00
}
return orElse();
}
}
2025-11-07 17:08:57 +07:00
abstract class _Cashier implements PrintStruckEvent {
const factory _Cashier(final Order order) = _$CashierImpl;
2025-11-07 16:29:26 +07:00
@override
Order get order;
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
2025-11-07 17:08:57 +07:00
_$$CashierImplCopyWith<_$CashierImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$PaymentImplCopyWith<$Res>
implements $PrintStruckEventCopyWith<$Res> {
factory _$$PaymentImplCopyWith(
_$PaymentImpl value,
$Res Function(_$PaymentImpl) then,
) = __$$PaymentImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({Order order});
@override
$OrderCopyWith<$Res> get order;
}
/// @nodoc
class __$$PaymentImplCopyWithImpl<$Res>
extends _$PrintStruckEventCopyWithImpl<$Res, _$PaymentImpl>
implements _$$PaymentImplCopyWith<$Res> {
__$$PaymentImplCopyWithImpl(
_$PaymentImpl _value,
$Res Function(_$PaymentImpl) _then,
) : super(_value, _then);
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? order = null}) {
return _then(
_$PaymentImpl(
null == order
? _value.order
: order // ignore: cast_nullable_to_non_nullable
as Order,
),
);
}
}
/// @nodoc
class _$PaymentImpl implements _Payment {
const _$PaymentImpl(this.order);
@override
final Order order;
@override
String toString() {
return 'PrintStruckEvent.payment(order: $order)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PaymentImpl &&
(identical(other.order, order) || other.order == order));
}
@override
int get hashCode => Object.hash(runtimeType, order);
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PaymentImplCopyWith<_$PaymentImpl> get copyWith =>
__$$PaymentImplCopyWithImpl<_$PaymentImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(Order order) order,
required TResult Function(Order order) cashier,
required TResult Function(Order order) payment,
}) {
return payment(this.order);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(Order order)? order,
TResult? Function(Order order)? cashier,
TResult? Function(Order order)? payment,
}) {
return payment?.call(this.order);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(Order order)? order,
TResult Function(Order order)? cashier,
TResult Function(Order order)? payment,
required TResult orElse(),
}) {
if (payment != null) {
return payment(this.order);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_Order value) order,
required TResult Function(_Cashier value) cashier,
required TResult Function(_Payment value) payment,
}) {
return payment(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_Order value)? order,
TResult? Function(_Cashier value)? cashier,
TResult? Function(_Payment value)? payment,
}) {
return payment?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_Order value)? order,
TResult Function(_Cashier value)? cashier,
TResult Function(_Payment value)? payment,
required TResult orElse(),
}) {
if (payment != null) {
return payment(this);
}
return orElse();
}
}
abstract class _Payment implements PrintStruckEvent {
const factory _Payment(final Order order) = _$PaymentImpl;
@override
Order get order;
/// Create a copy of PrintStruckEvent
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PaymentImplCopyWith<_$PaymentImpl> get copyWith =>
2025-11-07 16:29:26 +07:00
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$PrintStruckState {
Option<Either<PrinterFailure, Unit>> get failureOrPrintStruck =>
throw _privateConstructorUsedError;
bool get isPrinting => throw _privateConstructorUsedError;
/// Create a copy of PrintStruckState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PrintStruckStateCopyWith<PrintStruckState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PrintStruckStateCopyWith<$Res> {
factory $PrintStruckStateCopyWith(
PrintStruckState value,
$Res Function(PrintStruckState) then,
) = _$PrintStruckStateCopyWithImpl<$Res, PrintStruckState>;
@useResult
$Res call({
Option<Either<PrinterFailure, Unit>> failureOrPrintStruck,
bool isPrinting,
});
}
/// @nodoc
class _$PrintStruckStateCopyWithImpl<$Res, $Val extends PrintStruckState>
implements $PrintStruckStateCopyWith<$Res> {
_$PrintStruckStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PrintStruckState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? failureOrPrintStruck = null, Object? isPrinting = null}) {
return _then(
_value.copyWith(
failureOrPrintStruck: null == failureOrPrintStruck
? _value.failureOrPrintStruck
: failureOrPrintStruck // ignore: cast_nullable_to_non_nullable
as Option<Either<PrinterFailure, Unit>>,
isPrinting: null == isPrinting
? _value.isPrinting
: isPrinting // ignore: cast_nullable_to_non_nullable
as bool,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$PrintStruckStateImplCopyWith<$Res>
implements $PrintStruckStateCopyWith<$Res> {
factory _$$PrintStruckStateImplCopyWith(
_$PrintStruckStateImpl value,
$Res Function(_$PrintStruckStateImpl) then,
) = __$$PrintStruckStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
Option<Either<PrinterFailure, Unit>> failureOrPrintStruck,
bool isPrinting,
});
}
/// @nodoc
class __$$PrintStruckStateImplCopyWithImpl<$Res>
extends _$PrintStruckStateCopyWithImpl<$Res, _$PrintStruckStateImpl>
implements _$$PrintStruckStateImplCopyWith<$Res> {
__$$PrintStruckStateImplCopyWithImpl(
_$PrintStruckStateImpl _value,
$Res Function(_$PrintStruckStateImpl) _then,
) : super(_value, _then);
/// Create a copy of PrintStruckState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? failureOrPrintStruck = null, Object? isPrinting = null}) {
return _then(
_$PrintStruckStateImpl(
failureOrPrintStruck: null == failureOrPrintStruck
? _value.failureOrPrintStruck
: failureOrPrintStruck // ignore: cast_nullable_to_non_nullable
as Option<Either<PrinterFailure, Unit>>,
isPrinting: null == isPrinting
? _value.isPrinting
: isPrinting // ignore: cast_nullable_to_non_nullable
as bool,
),
);
}
}
/// @nodoc
class _$PrintStruckStateImpl implements _PrintStruckState {
_$PrintStruckStateImpl({
required this.failureOrPrintStruck,
this.isPrinting = false,
});
@override
final Option<Either<PrinterFailure, Unit>> failureOrPrintStruck;
@override
@JsonKey()
final bool isPrinting;
@override
String toString() {
return 'PrintStruckState(failureOrPrintStruck: $failureOrPrintStruck, isPrinting: $isPrinting)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PrintStruckStateImpl &&
(identical(other.failureOrPrintStruck, failureOrPrintStruck) ||
other.failureOrPrintStruck == failureOrPrintStruck) &&
(identical(other.isPrinting, isPrinting) ||
other.isPrinting == isPrinting));
}
@override
int get hashCode =>
Object.hash(runtimeType, failureOrPrintStruck, isPrinting);
/// Create a copy of PrintStruckState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PrintStruckStateImplCopyWith<_$PrintStruckStateImpl> get copyWith =>
__$$PrintStruckStateImplCopyWithImpl<_$PrintStruckStateImpl>(
this,
_$identity,
);
}
abstract class _PrintStruckState implements PrintStruckState {
factory _PrintStruckState({
required final Option<Either<PrinterFailure, Unit>> failureOrPrintStruck,
final bool isPrinting,
}) = _$PrintStruckStateImpl;
@override
Option<Either<PrinterFailure, Unit>> get failureOrPrintStruck;
@override
bool get isPrinting;
/// Create a copy of PrintStruckState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PrintStruckStateImplCopyWith<_$PrintStruckStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}