2026-10-01 01:43:22 +07:00
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
// 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 'wallet.dart' ;
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// dart format off
T _$identity < T > ( T value ) => value ;
/// @nodoc
mixin _$WalletSummary {
int get pointBalance ; int get coinBalance ; int get pointValue ; int get pointDiscountValue ; ExpiringAmount ? get nearestExpiringPoint ; ExpiringAmount ? get nearestExpiringCoin ; List < WalletTransaction > get recentTransactions ;
/// Create a copy of WalletSummary
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$WalletSummaryCopyWith < WalletSummary > get copyWith => _$WalletSummaryCopyWithImpl < WalletSummary > ( this as WalletSummary , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as WalletSummary ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is WalletSummary && ( identical ( other . pointBalance , _this . pointBalance ) || other . pointBalance == _this . pointBalance ) && ( identical ( other . coinBalance , _this . coinBalance ) || other . coinBalance == _this . coinBalance ) && ( identical ( other . pointValue , _this . pointValue ) || other . pointValue == _this . pointValue ) && ( identical ( other . pointDiscountValue , _this . pointDiscountValue ) || other . pointDiscountValue == _this . pointDiscountValue ) && ( identical ( other . nearestExpiringPoint , _this . nearestExpiringPoint ) || other . nearestExpiringPoint == _this . nearestExpiringPoint ) && ( identical ( other . nearestExpiringCoin , _this . nearestExpiringCoin ) || other . nearestExpiringCoin == _this . nearestExpiringCoin ) && const DeepCollectionEquality (). equals ( other . recentTransactions , _this . recentTransactions ));
}
@ override
int get hashCode {
final _this = this as WalletSummary ;
return Object . hash ( runtimeType , _this . pointBalance , _this . coinBalance , _this . pointValue , _this . pointDiscountValue , _this . nearestExpiringPoint , _this . nearestExpiringCoin , const DeepCollectionEquality (). hash ( _this . recentTransactions ));
}
@ override
String toString () {
final _this = this as WalletSummary ;
return 'WalletSummary(pointBalance: ${ _this . pointBalance } , coinBalance: ${ _this . coinBalance } , pointValue: ${ _this . pointValue } , pointDiscountValue: ${ _this . pointDiscountValue } , nearestExpiringPoint: ${ _this . nearestExpiringPoint } , nearestExpiringCoin: ${ _this . nearestExpiringCoin } , recentTransactions: ${ _this . recentTransactions } )' ;
}
}
/// @nodoc
abstract mixin class $WalletSummaryCopyWith < $Res > {
factory $WalletSummaryCopyWith ( WalletSummary value , $Res Function ( WalletSummary ) _then ) = _$WalletSummaryCopyWithImpl ;
@ useResult
$Res call ({
int pointBalance , int coinBalance , int pointValue , int pointDiscountValue , ExpiringAmount ? nearestExpiringPoint , ExpiringAmount ? nearestExpiringCoin , List < WalletTransaction > recentTransactions
});
$ExpiringAmountCopyWith < $Res >? get nearestExpiringPoint ; $ExpiringAmountCopyWith < $Res >? get nearestExpiringCoin ;
}
/// @nodoc
class _ $WalletSummaryCopyWithImpl < $Res >
implements $WalletSummaryCopyWith < $Res > {
_$WalletSummaryCopyWithImpl ( this . _self , this . _then );
final WalletSummary _self ;
final $Res Function ( WalletSummary ) _then ;
/// Create a copy of WalletSummary
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? pointBalance = null , Object ? coinBalance = null , Object ? pointValue = null , Object ? pointDiscountValue = null , Object ? nearestExpiringPoint = freezed , Object ? nearestExpiringCoin = freezed , Object ? recentTransactions = null ,}) {
return _then ( WalletSummary (
pointBalance: null == pointBalance ? _self . pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int , coinBalance: null == coinBalance ? _self . coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int , pointValue: null == pointValue ? _self . pointValue : pointValue // ignore: cast_nullable_to_non_nullable
as int , pointDiscountValue: null == pointDiscountValue ? _self . pointDiscountValue : pointDiscountValue // ignore: cast_nullable_to_non_nullable
as int , nearestExpiringPoint: freezed == nearestExpiringPoint ? _self . nearestExpiringPoint : nearestExpiringPoint // ignore: cast_nullable_to_non_nullable
as ExpiringAmount ? , nearestExpiringCoin: freezed == nearestExpiringCoin ? _self . nearestExpiringCoin : nearestExpiringCoin // ignore: cast_nullable_to_non_nullable
as ExpiringAmount ? , recentTransactions: null == recentTransactions ? _self . recentTransactions : recentTransactions // ignore: cast_nullable_to_non_nullable
as List < WalletTransaction > ,
));
}
/// Create a copy of WalletSummary
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$ExpiringAmountCopyWith < $Res >? get nearestExpiringPoint {
if ( _self . nearestExpiringPoint == null ) {
return null ;
}
return $ExpiringAmountCopyWith < $Res > ( _self . nearestExpiringPoint ! , ( value ) {
return _then ( _self . copyWith ( nearestExpiringPoint: value ));
});
} /// Create a copy of WalletSummary
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$ExpiringAmountCopyWith < $Res >? get nearestExpiringCoin {
if ( _self . nearestExpiringCoin == null ) {
return null ;
}
return $ExpiringAmountCopyWith < $Res > ( _self . nearestExpiringCoin ! , ( value ) {
return _then ( _self . copyWith ( nearestExpiringCoin: value ));
});
}
}
/// Adds pattern-matching-related methods to [WalletSummary].
extension WalletSummaryPatterns on WalletSummary {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _WalletSummary value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _WalletSummary () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _WalletSummary value ) $default ,){
final _that = this ;
switch ( _that ) {
case _WalletSummary () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _WalletSummary value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _WalletSummary () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( int pointBalance , int coinBalance , int pointValue , int pointDiscountValue , ExpiringAmount ? nearestExpiringPoint , ExpiringAmount ? nearestExpiringCoin , List < WalletTransaction > recentTransactions ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _WalletSummary () when $default != null :
return $default ( _that . pointBalance , _that . coinBalance , _that . pointValue , _that . pointDiscountValue , _that . nearestExpiringPoint , _that . nearestExpiringCoin , _that . recentTransactions ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( int pointBalance , int coinBalance , int pointValue , int pointDiscountValue , ExpiringAmount ? nearestExpiringPoint , ExpiringAmount ? nearestExpiringCoin , List < WalletTransaction > recentTransactions ) $default ,) { final _that = this ;
switch ( _that ) {
case _WalletSummary () :
return $default ( _that . pointBalance , _that . coinBalance , _that . pointValue , _that . pointDiscountValue , _that . nearestExpiringPoint , _that . nearestExpiringCoin , _that . recentTransactions ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( int pointBalance , int coinBalance , int pointValue , int pointDiscountValue , ExpiringAmount ? nearestExpiringPoint , ExpiringAmount ? nearestExpiringCoin , List < WalletTransaction > recentTransactions ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _WalletSummary () when $default != null :
return $default ( _that . pointBalance , _that . coinBalance , _that . pointValue , _that . pointDiscountValue , _that . nearestExpiringPoint , _that . nearestExpiringCoin , _that . recentTransactions ); case _:
return null ;
}
}
}
/// @nodoc
class _WalletSummary implements WalletSummary {
const _WalletSummary ({ required this . pointBalance , required this . coinBalance , required this . pointValue , required this . pointDiscountValue , this . nearestExpiringPoint , this . nearestExpiringCoin , required List < WalletTransaction > recentTransactions }) : _recentTransactions = recentTransactions ;
@ override final int pointBalance ;
@ override final int coinBalance ;
@ override final int pointValue ;
@ override final int pointDiscountValue ;
@ override final ExpiringAmount ? nearestExpiringPoint ;
@ override final ExpiringAmount ? nearestExpiringCoin ;
final List < WalletTransaction > _recentTransactions ;
@ override List < WalletTransaction > get recentTransactions {
if ( _recentTransactions is EqualUnmodifiableListView ) return _recentTransactions ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _recentTransactions );
}
/// Create a copy of WalletSummary
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$WalletSummaryCopyWith < _WalletSummary > get copyWith => __$WalletSummaryCopyWithImpl < _WalletSummary > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _WalletSummary && ( identical ( other . pointBalance , pointBalance ) || other . pointBalance == pointBalance ) && ( identical ( other . coinBalance , coinBalance ) || other . coinBalance == coinBalance ) && ( identical ( other . pointValue , pointValue ) || other . pointValue == pointValue ) && ( identical ( other . pointDiscountValue , pointDiscountValue ) || other . pointDiscountValue == pointDiscountValue ) && ( identical ( other . nearestExpiringPoint , nearestExpiringPoint ) || other . nearestExpiringPoint == nearestExpiringPoint ) && ( identical ( other . nearestExpiringCoin , nearestExpiringCoin ) || other . nearestExpiringCoin == nearestExpiringCoin ) && const DeepCollectionEquality (). equals ( other . recentTransactions , _recentTransactions ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , pointBalance , coinBalance , pointValue , pointDiscountValue , nearestExpiringPoint , nearestExpiringCoin , const DeepCollectionEquality (). hash ( _recentTransactions ));
}
@ override
String toString () {
return 'WalletSummary(pointBalance: $ pointBalance , coinBalance: $ coinBalance , pointValue: $ pointValue , pointDiscountValue: $ pointDiscountValue , nearestExpiringPoint: $ nearestExpiringPoint , nearestExpiringCoin: $ nearestExpiringCoin , recentTransactions: $ recentTransactions )' ;
}
}
/// @nodoc
abstract mixin class _ $WalletSummaryCopyWith < $Res > implements $WalletSummaryCopyWith < $Res > {
factory _$WalletSummaryCopyWith ( _WalletSummary value , $Res Function ( _WalletSummary ) _then ) = __$WalletSummaryCopyWithImpl ;
@ override @ useResult
$Res call ({
int pointBalance , int coinBalance , int pointValue , int pointDiscountValue , ExpiringAmount ? nearestExpiringPoint , ExpiringAmount ? nearestExpiringCoin , List < WalletTransaction > recentTransactions
});
@ override $ExpiringAmountCopyWith < $Res >? get nearestExpiringPoint ; @ override $ExpiringAmountCopyWith < $Res >? get nearestExpiringCoin ;
}
/// @nodoc
class __ $WalletSummaryCopyWithImpl < $Res >
implements _$WalletSummaryCopyWith < $Res > {
__$WalletSummaryCopyWithImpl ( this . _self , this . _then );
final _WalletSummary _self ;
final $Res Function ( _WalletSummary ) _then ;
/// Create a copy of WalletSummary
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? pointBalance = null , Object ? coinBalance = null , Object ? pointValue = null , Object ? pointDiscountValue = null , Object ? nearestExpiringPoint = freezed , Object ? nearestExpiringCoin = freezed , Object ? recentTransactions = null ,}) {
return _then ( _WalletSummary (
pointBalance: null == pointBalance ? _self . pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int , coinBalance: null == coinBalance ? _self . coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int , pointValue: null == pointValue ? _self . pointValue : pointValue // ignore: cast_nullable_to_non_nullable
as int , pointDiscountValue: null == pointDiscountValue ? _self . pointDiscountValue : pointDiscountValue // ignore: cast_nullable_to_non_nullable
as int , nearestExpiringPoint: freezed == nearestExpiringPoint ? _self . nearestExpiringPoint : nearestExpiringPoint // ignore: cast_nullable_to_non_nullable
as ExpiringAmount ? , nearestExpiringCoin: freezed == nearestExpiringCoin ? _self . nearestExpiringCoin : nearestExpiringCoin // ignore: cast_nullable_to_non_nullable
as ExpiringAmount ? , recentTransactions: null == recentTransactions ? _self . _recentTransactions : recentTransactions // ignore: cast_nullable_to_non_nullable
as List < WalletTransaction > ,
));
}
/// Create a copy of WalletSummary
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$ExpiringAmountCopyWith < $Res >? get nearestExpiringPoint {
if ( _self . nearestExpiringPoint == null ) {
return null ;
}
return $ExpiringAmountCopyWith < $Res > ( _self . nearestExpiringPoint ! , ( value ) {
return _then ( _self . copyWith ( nearestExpiringPoint: value ));
});
} /// Create a copy of WalletSummary
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$ExpiringAmountCopyWith < $Res >? get nearestExpiringCoin {
if ( _self . nearestExpiringCoin == null ) {
return null ;
}
return $ExpiringAmountCopyWith < $Res > ( _self . nearestExpiringCoin ! , ( value ) {
return _then ( _self . copyWith ( nearestExpiringCoin: value ));
});
}
}
/// @nodoc
mixin _$ExpiringAmount {
int get amount ; DateTime get date ;
/// Create a copy of ExpiringAmount
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$ExpiringAmountCopyWith < ExpiringAmount > get copyWith => _$ExpiringAmountCopyWithImpl < ExpiringAmount > ( this as ExpiringAmount , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as ExpiringAmount ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is ExpiringAmount && ( identical ( other . amount , _this . amount ) || other . amount == _this . amount ) && ( identical ( other . date , _this . date ) || other . date == _this . date ));
}
@ override
int get hashCode {
final _this = this as ExpiringAmount ;
return Object . hash ( runtimeType , _this . amount , _this . date );
}
@ override
String toString () {
final _this = this as ExpiringAmount ;
return 'ExpiringAmount(amount: ${ _this . amount } , date: ${ _this . date } )' ;
}
}
/// @nodoc
abstract mixin class $ExpiringAmountCopyWith < $Res > {
factory $ExpiringAmountCopyWith ( ExpiringAmount value , $Res Function ( ExpiringAmount ) _then ) = _$ExpiringAmountCopyWithImpl ;
@ useResult
$Res call ({
int amount , DateTime date
});
}
/// @nodoc
class _ $ExpiringAmountCopyWithImpl < $Res >
implements $ExpiringAmountCopyWith < $Res > {
_$ExpiringAmountCopyWithImpl ( this . _self , this . _then );
final ExpiringAmount _self ;
final $Res Function ( ExpiringAmount ) _then ;
/// Create a copy of ExpiringAmount
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? amount = null , Object ? date = null ,}) {
return _then ( ExpiringAmount (
amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , date: null == date ? _self . date : date // ignore: cast_nullable_to_non_nullable
as DateTime ,
));
}
}
/// Adds pattern-matching-related methods to [ExpiringAmount].
extension ExpiringAmountPatterns on ExpiringAmount {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _ExpiringAmount value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _ExpiringAmount () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _ExpiringAmount value ) $default ,){
final _that = this ;
switch ( _that ) {
case _ExpiringAmount () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _ExpiringAmount value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _ExpiringAmount () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( int amount , DateTime date ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _ExpiringAmount () when $default != null :
return $default ( _that . amount , _that . date ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( int amount , DateTime date ) $default ,) { final _that = this ;
switch ( _that ) {
case _ExpiringAmount () :
return $default ( _that . amount , _that . date ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( int amount , DateTime date ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _ExpiringAmount () when $default != null :
return $default ( _that . amount , _that . date ); case _:
return null ;
}
}
}
/// @nodoc
class _ExpiringAmount implements ExpiringAmount {
const _ExpiringAmount ({ required this . amount , required this . date });
@ override final int amount ;
@ override final DateTime date ;
/// Create a copy of ExpiringAmount
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$ExpiringAmountCopyWith < _ExpiringAmount > get copyWith => __$ExpiringAmountCopyWithImpl < _ExpiringAmount > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _ExpiringAmount && ( identical ( other . amount , amount ) || other . amount == amount ) && ( identical ( other . date , date ) || other . date == date ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , amount , date );
}
@ override
String toString () {
return 'ExpiringAmount(amount: $ amount , date: $ date )' ;
}
}
/// @nodoc
abstract mixin class _ $ExpiringAmountCopyWith < $Res > implements $ExpiringAmountCopyWith < $Res > {
factory _$ExpiringAmountCopyWith ( _ExpiringAmount value , $Res Function ( _ExpiringAmount ) _then ) = __$ExpiringAmountCopyWithImpl ;
@ override @ useResult
$Res call ({
int amount , DateTime date
});
}
/// @nodoc
class __ $ExpiringAmountCopyWithImpl < $Res >
implements _$ExpiringAmountCopyWith < $Res > {
__$ExpiringAmountCopyWithImpl ( this . _self , this . _then );
final _ExpiringAmount _self ;
final $Res Function ( _ExpiringAmount ) _then ;
/// Create a copy of ExpiringAmount
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? amount = null , Object ? date = null ,}) {
return _then ( _ExpiringAmount (
amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , date: null == date ? _self . date : date // ignore: cast_nullable_to_non_nullable
as DateTime ,
));
}
}
/// @nodoc
mixin _$WalletTransaction {
String get id ; WalletCurrency get currency ; WalletTransactionType get type ; int get amount ; int get balanceAfter ; String get description ; String ? get groupId ; DateTime ? get expiresAt ; DateTime ? get createdAt ;
/// Create a copy of WalletTransaction
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$WalletTransactionCopyWith < WalletTransaction > get copyWith => _$WalletTransactionCopyWithImpl < WalletTransaction > ( this as WalletTransaction , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as WalletTransaction ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is WalletTransaction && ( identical ( other . id , _this . id ) || other . id == _this . id ) && ( identical ( other . currency , _this . currency ) || other . currency == _this . currency ) && ( identical ( other . type , _this . type ) || other . type == _this . type ) && ( identical ( other . amount , _this . amount ) || other . amount == _this . amount ) && ( identical ( other . balanceAfter , _this . balanceAfter ) || other . balanceAfter == _this . balanceAfter ) && ( identical ( other . description , _this . description ) || other . description == _this . description ) && ( identical ( other . groupId , _this . groupId ) || other . groupId == _this . groupId ) && ( identical ( other . expiresAt , _this . expiresAt ) || other . expiresAt == _this . expiresAt ) && ( identical ( other . createdAt , _this . createdAt ) || other . createdAt == _this . createdAt ));
}
@ override
int get hashCode {
final _this = this as WalletTransaction ;
return Object . hash ( runtimeType , _this . id , _this . currency , _this . type , _this . amount , _this . balanceAfter , _this . description , _this . groupId , _this . expiresAt , _this . createdAt );
}
@ override
String toString () {
final _this = this as WalletTransaction ;
return 'WalletTransaction(id: ${ _this . id } , currency: ${ _this . currency } , type: ${ _this . type } , amount: ${ _this . amount } , balanceAfter: ${ _this . balanceAfter } , description: ${ _this . description } , groupId: ${ _this . groupId } , expiresAt: ${ _this . expiresAt } , createdAt: ${ _this . createdAt } )' ;
}
}
/// @nodoc
abstract mixin class $WalletTransactionCopyWith < $Res > {
factory $WalletTransactionCopyWith ( WalletTransaction value , $Res Function ( WalletTransaction ) _then ) = _$WalletTransactionCopyWithImpl ;
@ useResult
$Res call ({
String id , WalletCurrency currency , WalletTransactionType type , int amount , int balanceAfter , String description , String ? groupId , DateTime ? expiresAt , DateTime ? createdAt
});
}
/// @nodoc
class _ $WalletTransactionCopyWithImpl < $Res >
implements $WalletTransactionCopyWith < $Res > {
_$WalletTransactionCopyWithImpl ( this . _self , this . _then );
final WalletTransaction _self ;
final $Res Function ( WalletTransaction ) _then ;
/// Create a copy of WalletTransaction
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? id = null , Object ? currency = null , Object ? type = null , Object ? amount = null , Object ? balanceAfter = null , Object ? description = null , Object ? groupId = freezed , Object ? expiresAt = freezed , Object ? createdAt = freezed ,}) {
return _then ( WalletTransaction (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , currency: null == currency ? _self . currency : currency // ignore: cast_nullable_to_non_nullable
as WalletCurrency , type: null == type ? _self . type : type // ignore: cast_nullable_to_non_nullable
as WalletTransactionType , amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , balanceAfter: null == balanceAfter ? _self . balanceAfter : balanceAfter // ignore: cast_nullable_to_non_nullable
as int , description: null == description ? _self . description : description // ignore: cast_nullable_to_non_nullable
as String , groupId: freezed == groupId ? _self . groupId : groupId // ignore: cast_nullable_to_non_nullable
as String ? , expiresAt: freezed == expiresAt ? _self . expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime ? , createdAt: freezed == createdAt ? _self . createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// Adds pattern-matching-related methods to [WalletTransaction].
extension WalletTransactionPatterns on WalletTransaction {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _WalletTransaction value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _WalletTransaction () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _WalletTransaction value ) $default ,){
final _that = this ;
switch ( _that ) {
case _WalletTransaction () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _WalletTransaction value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _WalletTransaction () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( String id , WalletCurrency currency , WalletTransactionType type , int amount , int balanceAfter , String description , String ? groupId , DateTime ? expiresAt , DateTime ? createdAt ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _WalletTransaction () when $default != null :
return $default ( _that . id , _that . currency , _that . type , _that . amount , _that . balanceAfter , _that . description , _that . groupId , _that . expiresAt , _that . createdAt ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( String id , WalletCurrency currency , WalletTransactionType type , int amount , int balanceAfter , String description , String ? groupId , DateTime ? expiresAt , DateTime ? createdAt ) $default ,) { final _that = this ;
switch ( _that ) {
case _WalletTransaction () :
return $default ( _that . id , _that . currency , _that . type , _that . amount , _that . balanceAfter , _that . description , _that . groupId , _that . expiresAt , _that . createdAt ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( String id , WalletCurrency currency , WalletTransactionType type , int amount , int balanceAfter , String description , String ? groupId , DateTime ? expiresAt , DateTime ? createdAt ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _WalletTransaction () when $default != null :
return $default ( _that . id , _that . currency , _that . type , _that . amount , _that . balanceAfter , _that . description , _that . groupId , _that . expiresAt , _that . createdAt ); case _:
return null ;
}
}
}
/// @nodoc
class _WalletTransaction extends WalletTransaction {
const _WalletTransaction ({ required this . id , required this . currency , required this . type , required this . amount , required this . balanceAfter , required this . description , this . groupId , this . expiresAt , this . createdAt }) : super . _ ();
@ override final String id ;
@ override final WalletCurrency currency ;
@ override final WalletTransactionType type ;
@ override final int amount ;
@ override final int balanceAfter ;
@ override final String description ;
@ override final String ? groupId ;
@ override final DateTime ? expiresAt ;
@ override final DateTime ? createdAt ;
/// Create a copy of WalletTransaction
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$WalletTransactionCopyWith < _WalletTransaction > get copyWith => __$WalletTransactionCopyWithImpl < _WalletTransaction > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _WalletTransaction && ( identical ( other . id , id ) || other . id == id ) && ( identical ( other . currency , currency ) || other . currency == currency ) && ( identical ( other . type , type ) || other . type == type ) && ( identical ( other . amount , amount ) || other . amount == amount ) && ( identical ( other . balanceAfter , balanceAfter ) || other . balanceAfter == balanceAfter ) && ( identical ( other . description , description ) || other . description == description ) && ( identical ( other . groupId , groupId ) || other . groupId == groupId ) && ( identical ( other . expiresAt , expiresAt ) || other . expiresAt == expiresAt ) && ( identical ( other . createdAt , createdAt ) || other . createdAt == createdAt ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , id , currency , type , amount , balanceAfter , description , groupId , expiresAt , createdAt );
}
@ override
String toString () {
return 'WalletTransaction(id: $ id , currency: $ currency , type: $ type , amount: $ amount , balanceAfter: $ balanceAfter , description: $ description , groupId: $ groupId , expiresAt: $ expiresAt , createdAt: $ createdAt )' ;
}
}
/// @nodoc
abstract mixin class _ $WalletTransactionCopyWith < $Res > implements $WalletTransactionCopyWith < $Res > {
factory _$WalletTransactionCopyWith ( _WalletTransaction value , $Res Function ( _WalletTransaction ) _then ) = __$WalletTransactionCopyWithImpl ;
@ override @ useResult
$Res call ({
String id , WalletCurrency currency , WalletTransactionType type , int amount , int balanceAfter , String description , String ? groupId , DateTime ? expiresAt , DateTime ? createdAt
});
}
/// @nodoc
class __ $WalletTransactionCopyWithImpl < $Res >
implements _$WalletTransactionCopyWith < $Res > {
__$WalletTransactionCopyWithImpl ( this . _self , this . _then );
final _WalletTransaction _self ;
final $Res Function ( _WalletTransaction ) _then ;
/// Create a copy of WalletTransaction
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? id = null , Object ? currency = null , Object ? type = null , Object ? amount = null , Object ? balanceAfter = null , Object ? description = null , Object ? groupId = freezed , Object ? expiresAt = freezed , Object ? createdAt = freezed ,}) {
return _then ( _WalletTransaction (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , currency: null == currency ? _self . currency : currency // ignore: cast_nullable_to_non_nullable
as WalletCurrency , type: null == type ? _self . type : type // ignore: cast_nullable_to_non_nullable
as WalletTransactionType , amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , balanceAfter: null == balanceAfter ? _self . balanceAfter : balanceAfter // ignore: cast_nullable_to_non_nullable
as int , description: null == description ? _self . description : description // ignore: cast_nullable_to_non_nullable
as String , groupId: freezed == groupId ? _self . groupId : groupId // ignore: cast_nullable_to_non_nullable
as String ? , expiresAt: freezed == expiresAt ? _self . expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime ? , createdAt: freezed == createdAt ? _self . createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// @nodoc
mixin _$WalletTransactionPage {
List < WalletTransaction > get items ; int get page ; int get totalPages ; int get totalCount ;
/// Create a copy of WalletTransactionPage
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$WalletTransactionPageCopyWith < WalletTransactionPage > get copyWith => _$WalletTransactionPageCopyWithImpl < WalletTransactionPage > ( this as WalletTransactionPage , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as WalletTransactionPage ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is WalletTransactionPage && const DeepCollectionEquality (). equals ( other . items , _this . items ) && ( identical ( other . page , _this . page ) || other . page == _this . page ) && ( identical ( other . totalPages , _this . totalPages ) || other . totalPages == _this . totalPages ) && ( identical ( other . totalCount , _this . totalCount ) || other . totalCount == _this . totalCount ));
}
@ override
int get hashCode {
final _this = this as WalletTransactionPage ;
return Object . hash ( runtimeType , const DeepCollectionEquality (). hash ( _this . items ), _this . page , _this . totalPages , _this . totalCount );
}
@ override
String toString () {
final _this = this as WalletTransactionPage ;
return 'WalletTransactionPage(items: ${ _this . items } , page: ${ _this . page } , totalPages: ${ _this . totalPages } , totalCount: ${ _this . totalCount } )' ;
}
}
/// @nodoc
abstract mixin class $WalletTransactionPageCopyWith < $Res > {
factory $WalletTransactionPageCopyWith ( WalletTransactionPage value , $Res Function ( WalletTransactionPage ) _then ) = _$WalletTransactionPageCopyWithImpl ;
@ useResult
$Res call ({
List < WalletTransaction > items , int page , int totalPages , int totalCount
});
}
/// @nodoc
class _ $WalletTransactionPageCopyWithImpl < $Res >
implements $WalletTransactionPageCopyWith < $Res > {
_$WalletTransactionPageCopyWithImpl ( this . _self , this . _then );
final WalletTransactionPage _self ;
final $Res Function ( WalletTransactionPage ) _then ;
/// Create a copy of WalletTransactionPage
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? items = null , Object ? page = null , Object ? totalPages = null , Object ? totalCount = null ,}) {
return _then ( WalletTransactionPage (
items: null == items ? _self . items : items // ignore: cast_nullable_to_non_nullable
as List < WalletTransaction > , page: null == page ? _self . page : page // ignore: cast_nullable_to_non_nullable
as int , totalPages: null == totalPages ? _self . totalPages : totalPages // ignore: cast_nullable_to_non_nullable
as int , totalCount: null == totalCount ? _self . totalCount : totalCount // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// Adds pattern-matching-related methods to [WalletTransactionPage].
extension WalletTransactionPagePatterns on WalletTransactionPage {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _WalletTransactionPage value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _WalletTransactionPage () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _WalletTransactionPage value ) $default ,){
final _that = this ;
switch ( _that ) {
case _WalletTransactionPage () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _WalletTransactionPage value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _WalletTransactionPage () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( List < WalletTransaction > items , int page , int totalPages , int totalCount ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _WalletTransactionPage () when $default != null :
return $default ( _that . items , _that . page , _that . totalPages , _that . totalCount ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( List < WalletTransaction > items , int page , int totalPages , int totalCount ) $default ,) { final _that = this ;
switch ( _that ) {
case _WalletTransactionPage () :
return $default ( _that . items , _that . page , _that . totalPages , _that . totalCount ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( List < WalletTransaction > items , int page , int totalPages , int totalCount ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _WalletTransactionPage () when $default != null :
return $default ( _that . items , _that . page , _that . totalPages , _that . totalCount ); case _:
return null ;
}
}
}
/// @nodoc
class _WalletTransactionPage implements WalletTransactionPage {
const _WalletTransactionPage ({ required List < WalletTransaction > items , required this . page , required this . totalPages , required this . totalCount }) : _items = items ;
final List < WalletTransaction > _items ;
@ override List < WalletTransaction > get items {
if ( _items is EqualUnmodifiableListView ) return _items ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _items );
}
@ override final int page ;
@ override final int totalPages ;
@ override final int totalCount ;
/// Create a copy of WalletTransactionPage
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$WalletTransactionPageCopyWith < _WalletTransactionPage > get copyWith => __$WalletTransactionPageCopyWithImpl < _WalletTransactionPage > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _WalletTransactionPage && const DeepCollectionEquality (). equals ( other . items , _items ) && ( identical ( other . page , page ) || other . page == page ) && ( identical ( other . totalPages , totalPages ) || other . totalPages == totalPages ) && ( identical ( other . totalCount , totalCount ) || other . totalCount == totalCount ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , const DeepCollectionEquality (). hash ( _items ), page , totalPages , totalCount );
}
@ override
String toString () {
return 'WalletTransactionPage(items: $ items , page: $ page , totalPages: $ totalPages , totalCount: $ totalCount )' ;
}
}
/// @nodoc
abstract mixin class _ $WalletTransactionPageCopyWith < $Res > implements $WalletTransactionPageCopyWith < $Res > {
factory _$WalletTransactionPageCopyWith ( _WalletTransactionPage value , $Res Function ( _WalletTransactionPage ) _then ) = __$WalletTransactionPageCopyWithImpl ;
@ override @ useResult
$Res call ({
List < WalletTransaction > items , int page , int totalPages , int totalCount
});
}
/// @nodoc
class __ $WalletTransactionPageCopyWithImpl < $Res >
implements _$WalletTransactionPageCopyWith < $Res > {
__$WalletTransactionPageCopyWithImpl ( this . _self , this . _then );
final _WalletTransactionPage _self ;
final $Res Function ( _WalletTransactionPage ) _then ;
/// Create a copy of WalletTransactionPage
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? items = null , Object ? page = null , Object ? totalPages = null , Object ? totalCount = null ,}) {
return _then ( _WalletTransactionPage (
items: null == items ? _self . _items : items // ignore: cast_nullable_to_non_nullable
as List < WalletTransaction > , page: null == page ? _self . page : page // ignore: cast_nullable_to_non_nullable
as int , totalPages: null == totalPages ? _self . totalPages : totalPages // ignore: cast_nullable_to_non_nullable
as int , totalCount: null == totalCount ? _self . totalCount : totalCount // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// @nodoc
mixin _$WalletExpiring {
List < ExpiringAmount > get point ; List < ExpiringAmount > get coin ;
/// Create a copy of WalletExpiring
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$WalletExpiringCopyWith < WalletExpiring > get copyWith => _$WalletExpiringCopyWithImpl < WalletExpiring > ( this as WalletExpiring , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as WalletExpiring ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is WalletExpiring && const DeepCollectionEquality (). equals ( other . point , _this . point ) && const DeepCollectionEquality (). equals ( other . coin , _this . coin ));
}
@ override
int get hashCode {
final _this = this as WalletExpiring ;
return Object . hash ( runtimeType , const DeepCollectionEquality (). hash ( _this . point ), const DeepCollectionEquality (). hash ( _this . coin ));
}
@ override
String toString () {
final _this = this as WalletExpiring ;
return 'WalletExpiring(point: ${ _this . point } , coin: ${ _this . coin } )' ;
}
}
/// @nodoc
abstract mixin class $WalletExpiringCopyWith < $Res > {
factory $WalletExpiringCopyWith ( WalletExpiring value , $Res Function ( WalletExpiring ) _then ) = _$WalletExpiringCopyWithImpl ;
@ useResult
$Res call ({
List < ExpiringAmount > point , List < ExpiringAmount > coin
});
}
/// @nodoc
class _ $WalletExpiringCopyWithImpl < $Res >
implements $WalletExpiringCopyWith < $Res > {
_$WalletExpiringCopyWithImpl ( this . _self , this . _then );
final WalletExpiring _self ;
final $Res Function ( WalletExpiring ) _then ;
/// Create a copy of WalletExpiring
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? point = null , Object ? coin = null ,}) {
return _then ( WalletExpiring (
point: null == point ? _self . point : point // ignore: cast_nullable_to_non_nullable
as List < ExpiringAmount > , coin: null == coin ? _self . coin : coin // ignore: cast_nullable_to_non_nullable
as List < ExpiringAmount > ,
));
}
}
/// Adds pattern-matching-related methods to [WalletExpiring].
extension WalletExpiringPatterns on WalletExpiring {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _WalletExpiring value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _WalletExpiring () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _WalletExpiring value ) $default ,){
final _that = this ;
switch ( _that ) {
case _WalletExpiring () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _WalletExpiring value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _WalletExpiring () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( List < ExpiringAmount > point , List < ExpiringAmount > coin ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _WalletExpiring () when $default != null :
return $default ( _that . point , _that . coin ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( List < ExpiringAmount > point , List < ExpiringAmount > coin ) $default ,) { final _that = this ;
switch ( _that ) {
case _WalletExpiring () :
return $default ( _that . point , _that . coin ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( List < ExpiringAmount > point , List < ExpiringAmount > coin ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _WalletExpiring () when $default != null :
return $default ( _that . point , _that . coin ); case _:
return null ;
}
}
}
/// @nodoc
class _WalletExpiring implements WalletExpiring {
const _WalletExpiring ({ required List < ExpiringAmount > point , required List < ExpiringAmount > coin }) : _point = point , _coin = coin ;
final List < ExpiringAmount > _point ;
@ override List < ExpiringAmount > get point {
if ( _point is EqualUnmodifiableListView ) return _point ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _point );
}
final List < ExpiringAmount > _coin ;
@ override List < ExpiringAmount > get coin {
if ( _coin is EqualUnmodifiableListView ) return _coin ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _coin );
}
/// Create a copy of WalletExpiring
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$WalletExpiringCopyWith < _WalletExpiring > get copyWith => __$WalletExpiringCopyWithImpl < _WalletExpiring > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _WalletExpiring && const DeepCollectionEquality (). equals ( other . point , _point ) && const DeepCollectionEquality (). equals ( other . coin , _coin ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , const DeepCollectionEquality (). hash ( _point ), const DeepCollectionEquality (). hash ( _coin ));
}
@ override
String toString () {
return 'WalletExpiring(point: $ point , coin: $ coin )' ;
}
}
/// @nodoc
abstract mixin class _ $WalletExpiringCopyWith < $Res > implements $WalletExpiringCopyWith < $Res > {
factory _$WalletExpiringCopyWith ( _WalletExpiring value , $Res Function ( _WalletExpiring ) _then ) = __$WalletExpiringCopyWithImpl ;
@ override @ useResult
$Res call ({
List < ExpiringAmount > point , List < ExpiringAmount > coin
});
}
/// @nodoc
class __ $WalletExpiringCopyWithImpl < $Res >
implements _$WalletExpiringCopyWith < $Res > {
__$WalletExpiringCopyWithImpl ( this . _self , this . _then );
final _WalletExpiring _self ;
final $Res Function ( _WalletExpiring ) _then ;
/// Create a copy of WalletExpiring
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? point = null , Object ? coin = null ,}) {
return _then ( _WalletExpiring (
point: null == point ? _self . _point : point // ignore: cast_nullable_to_non_nullable
as List < ExpiringAmount > , coin: null == coin ? _self . _coin : coin // ignore: cast_nullable_to_non_nullable
as List < ExpiringAmount > ,
));
}
}
/// @nodoc
mixin _$ExchangePreview {
int get coinAmount ; int get pointAmount ; int get coinBalance ; int get coins ; int get points ; bool get valid ; String ? get reason ;
/// Create a copy of ExchangePreview
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$ExchangePreviewCopyWith < ExchangePreview > get copyWith => _$ExchangePreviewCopyWithImpl < ExchangePreview > ( this as ExchangePreview , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as ExchangePreview ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is ExchangePreview && ( identical ( other . coinAmount , _this . coinAmount ) || other . coinAmount == _this . coinAmount ) && ( identical ( other . pointAmount , _this . pointAmount ) || other . pointAmount == _this . pointAmount ) && ( identical ( other . coinBalance , _this . coinBalance ) || other . coinBalance == _this . coinBalance ) && ( identical ( other . coins , _this . coins ) || other . coins == _this . coins ) && ( identical ( other . points , _this . points ) || other . points == _this . points ) && ( identical ( other . valid , _this . valid ) || other . valid == _this . valid ) && ( identical ( other . reason , _this . reason ) || other . reason == _this . reason ));
}
@ override
int get hashCode {
final _this = this as ExchangePreview ;
return Object . hash ( runtimeType , _this . coinAmount , _this . pointAmount , _this . coinBalance , _this . coins , _this . points , _this . valid , _this . reason );
}
@ override
String toString () {
final _this = this as ExchangePreview ;
return 'ExchangePreview(coinAmount: ${ _this . coinAmount } , pointAmount: ${ _this . pointAmount } , coinBalance: ${ _this . coinBalance } , coins: ${ _this . coins } , points: ${ _this . points } , valid: ${ _this . valid } , reason: ${ _this . reason } )' ;
}
}
/// @nodoc
abstract mixin class $ExchangePreviewCopyWith < $Res > {
factory $ExchangePreviewCopyWith ( ExchangePreview value , $Res Function ( ExchangePreview ) _then ) = _$ExchangePreviewCopyWithImpl ;
@ useResult
$Res call ({
int coinAmount , int pointAmount , int coinBalance , int coins , int points , bool valid , String ? reason
});
}
/// @nodoc
class _ $ExchangePreviewCopyWithImpl < $Res >
implements $ExchangePreviewCopyWith < $Res > {
_$ExchangePreviewCopyWithImpl ( this . _self , this . _then );
final ExchangePreview _self ;
final $Res Function ( ExchangePreview ) _then ;
/// Create a copy of ExchangePreview
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? coinAmount = null , Object ? pointAmount = null , Object ? coinBalance = null , Object ? coins = null , Object ? points = null , Object ? valid = null , Object ? reason = freezed ,}) {
return _then ( ExchangePreview (
coinAmount: null == coinAmount ? _self . coinAmount : coinAmount // ignore: cast_nullable_to_non_nullable
as int , pointAmount: null == pointAmount ? _self . pointAmount : pointAmount // ignore: cast_nullable_to_non_nullable
as int , coinBalance: null == coinBalance ? _self . coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int , coins: null == coins ? _self . coins : coins // ignore: cast_nullable_to_non_nullable
as int , points: null == points ? _self . points : points // ignore: cast_nullable_to_non_nullable
as int , valid: null == valid ? _self . valid : valid // ignore: cast_nullable_to_non_nullable
as bool , reason: freezed == reason ? _self . reason : reason // ignore: cast_nullable_to_non_nullable
as String ? ,
));
}
}
/// Adds pattern-matching-related methods to [ExchangePreview].
extension ExchangePreviewPatterns on ExchangePreview {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _ExchangePreview value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _ExchangePreview () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _ExchangePreview value ) $default ,){
final _that = this ;
switch ( _that ) {
case _ExchangePreview () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _ExchangePreview value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _ExchangePreview () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( int coinAmount , int pointAmount , int coinBalance , int coins , int points , bool valid , String ? reason ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _ExchangePreview () when $default != null :
return $default ( _that . coinAmount , _that . pointAmount , _that . coinBalance , _that . coins , _that . points , _that . valid , _that . reason ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( int coinAmount , int pointAmount , int coinBalance , int coins , int points , bool valid , String ? reason ) $default ,) { final _that = this ;
switch ( _that ) {
case _ExchangePreview () :
return $default ( _that . coinAmount , _that . pointAmount , _that . coinBalance , _that . coins , _that . points , _that . valid , _that . reason ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( int coinAmount , int pointAmount , int coinBalance , int coins , int points , bool valid , String ? reason ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _ExchangePreview () when $default != null :
return $default ( _that . coinAmount , _that . pointAmount , _that . coinBalance , _that . coins , _that . points , _that . valid , _that . reason ); case _:
return null ;
}
}
}
/// @nodoc
class _ExchangePreview implements ExchangePreview {
const _ExchangePreview ({ required this . coinAmount , required this . pointAmount , required this . coinBalance , required this . coins , required this . points , required this . valid , this . reason });
@ override final int coinAmount ;
@ override final int pointAmount ;
@ override final int coinBalance ;
@ override final int coins ;
@ override final int points ;
@ override final bool valid ;
@ override final String ? reason ;
/// Create a copy of ExchangePreview
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$ExchangePreviewCopyWith < _ExchangePreview > get copyWith => __$ExchangePreviewCopyWithImpl < _ExchangePreview > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _ExchangePreview && ( identical ( other . coinAmount , coinAmount ) || other . coinAmount == coinAmount ) && ( identical ( other . pointAmount , pointAmount ) || other . pointAmount == pointAmount ) && ( identical ( other . coinBalance , coinBalance ) || other . coinBalance == coinBalance ) && ( identical ( other . coins , coins ) || other . coins == coins ) && ( identical ( other . points , points ) || other . points == points ) && ( identical ( other . valid , valid ) || other . valid == valid ) && ( identical ( other . reason , reason ) || other . reason == reason ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , coinAmount , pointAmount , coinBalance , coins , points , valid , reason );
}
@ override
String toString () {
return 'ExchangePreview(coinAmount: $ coinAmount , pointAmount: $ pointAmount , coinBalance: $ coinBalance , coins: $ coins , points: $ points , valid: $ valid , reason: $ reason )' ;
}
}
/// @nodoc
abstract mixin class _ $ExchangePreviewCopyWith < $Res > implements $ExchangePreviewCopyWith < $Res > {
factory _$ExchangePreviewCopyWith ( _ExchangePreview value , $Res Function ( _ExchangePreview ) _then ) = __$ExchangePreviewCopyWithImpl ;
@ override @ useResult
$Res call ({
int coinAmount , int pointAmount , int coinBalance , int coins , int points , bool valid , String ? reason
});
}
/// @nodoc
class __ $ExchangePreviewCopyWithImpl < $Res >
implements _$ExchangePreviewCopyWith < $Res > {
__$ExchangePreviewCopyWithImpl ( this . _self , this . _then );
final _ExchangePreview _self ;
final $Res Function ( _ExchangePreview ) _then ;
/// Create a copy of ExchangePreview
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? coinAmount = null , Object ? pointAmount = null , Object ? coinBalance = null , Object ? coins = null , Object ? points = null , Object ? valid = null , Object ? reason = freezed ,}) {
return _then ( _ExchangePreview (
coinAmount: null == coinAmount ? _self . coinAmount : coinAmount // ignore: cast_nullable_to_non_nullable
as int , pointAmount: null == pointAmount ? _self . pointAmount : pointAmount // ignore: cast_nullable_to_non_nullable
as int , coinBalance: null == coinBalance ? _self . coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int , coins: null == coins ? _self . coins : coins // ignore: cast_nullable_to_non_nullable
as int , points: null == points ? _self . points : points // ignore: cast_nullable_to_non_nullable
as int , valid: null == valid ? _self . valid : valid // ignore: cast_nullable_to_non_nullable
as bool , reason: freezed == reason ? _self . reason : reason // ignore: cast_nullable_to_non_nullable
as String ? ,
));
}
}
/// @nodoc
mixin _$ExchangeResult {
int get coins ; int get points ; int get coinBalance ; int get pointBalance ; List < WalletLot > get lots ; bool get replayed ;
/// Create a copy of ExchangeResult
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$ExchangeResultCopyWith < ExchangeResult > get copyWith => _$ExchangeResultCopyWithImpl < ExchangeResult > ( this as ExchangeResult , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as ExchangeResult ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is ExchangeResult && ( identical ( other . coins , _this . coins ) || other . coins == _this . coins ) && ( identical ( other . points , _this . points ) || other . points == _this . points ) && ( identical ( other . coinBalance , _this . coinBalance ) || other . coinBalance == _this . coinBalance ) && ( identical ( other . pointBalance , _this . pointBalance ) || other . pointBalance == _this . pointBalance ) && const DeepCollectionEquality (). equals ( other . lots , _this . lots ) && ( identical ( other . replayed , _this . replayed ) || other . replayed == _this . replayed ));
}
@ override
int get hashCode {
final _this = this as ExchangeResult ;
return Object . hash ( runtimeType , _this . coins , _this . points , _this . coinBalance , _this . pointBalance , const DeepCollectionEquality (). hash ( _this . lots ), _this . replayed );
}
@ override
String toString () {
final _this = this as ExchangeResult ;
return 'ExchangeResult(coins: ${ _this . coins } , points: ${ _this . points } , coinBalance: ${ _this . coinBalance } , pointBalance: ${ _this . pointBalance } , lots: ${ _this . lots } , replayed: ${ _this . replayed } )' ;
}
}
/// @nodoc
abstract mixin class $ExchangeResultCopyWith < $Res > {
factory $ExchangeResultCopyWith ( ExchangeResult value , $Res Function ( ExchangeResult ) _then ) = _$ExchangeResultCopyWithImpl ;
@ useResult
$Res call ({
int coins , int points , int coinBalance , int pointBalance , List < WalletLot > lots , bool replayed
});
}
/// @nodoc
class _ $ExchangeResultCopyWithImpl < $Res >
implements $ExchangeResultCopyWith < $Res > {
_$ExchangeResultCopyWithImpl ( this . _self , this . _then );
final ExchangeResult _self ;
final $Res Function ( ExchangeResult ) _then ;
/// Create a copy of ExchangeResult
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? coins = null , Object ? points = null , Object ? coinBalance = null , Object ? pointBalance = null , Object ? lots = null , Object ? replayed = null ,}) {
return _then ( ExchangeResult (
coins: null == coins ? _self . coins : coins // ignore: cast_nullable_to_non_nullable
as int , points: null == points ? _self . points : points // ignore: cast_nullable_to_non_nullable
as int , coinBalance: null == coinBalance ? _self . coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int , pointBalance: null == pointBalance ? _self . pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int , lots: null == lots ? _self . lots : lots // ignore: cast_nullable_to_non_nullable
as List < WalletLot > , replayed: null == replayed ? _self . replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool ,
));
}
}
/// Adds pattern-matching-related methods to [ExchangeResult].
extension ExchangeResultPatterns on ExchangeResult {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _ExchangeResult value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _ExchangeResult () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _ExchangeResult value ) $default ,){
final _that = this ;
switch ( _that ) {
case _ExchangeResult () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _ExchangeResult value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _ExchangeResult () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( int coins , int points , int coinBalance , int pointBalance , List < WalletLot > lots , bool replayed ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _ExchangeResult () when $default != null :
return $default ( _that . coins , _that . points , _that . coinBalance , _that . pointBalance , _that . lots , _that . replayed ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( int coins , int points , int coinBalance , int pointBalance , List < WalletLot > lots , bool replayed ) $default ,) { final _that = this ;
switch ( _that ) {
case _ExchangeResult () :
return $default ( _that . coins , _that . points , _that . coinBalance , _that . pointBalance , _that . lots , _that . replayed ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( int coins , int points , int coinBalance , int pointBalance , List < WalletLot > lots , bool replayed ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _ExchangeResult () when $default != null :
return $default ( _that . coins , _that . points , _that . coinBalance , _that . pointBalance , _that . lots , _that . replayed ); case _:
return null ;
}
}
}
/// @nodoc
class _ExchangeResult implements ExchangeResult {
const _ExchangeResult ({ required this . coins , required this . points , required this . coinBalance , required this . pointBalance , required List < WalletLot > lots , required this . replayed }) : _lots = lots ;
@ override final int coins ;
@ override final int points ;
@ override final int coinBalance ;
@ override final int pointBalance ;
final List < WalletLot > _lots ;
@ override List < WalletLot > get lots {
if ( _lots is EqualUnmodifiableListView ) return _lots ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _lots );
}
@ override final bool replayed ;
/// Create a copy of ExchangeResult
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$ExchangeResultCopyWith < _ExchangeResult > get copyWith => __$ExchangeResultCopyWithImpl < _ExchangeResult > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _ExchangeResult && ( identical ( other . coins , coins ) || other . coins == coins ) && ( identical ( other . points , points ) || other . points == points ) && ( identical ( other . coinBalance , coinBalance ) || other . coinBalance == coinBalance ) && ( identical ( other . pointBalance , pointBalance ) || other . pointBalance == pointBalance ) && const DeepCollectionEquality (). equals ( other . lots , _lots ) && ( identical ( other . replayed , replayed ) || other . replayed == replayed ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , coins , points , coinBalance , pointBalance , const DeepCollectionEquality (). hash ( _lots ), replayed );
}
@ override
String toString () {
return 'ExchangeResult(coins: $ coins , points: $ points , coinBalance: $ coinBalance , pointBalance: $ pointBalance , lots: $ lots , replayed: $ replayed )' ;
}
}
/// @nodoc
abstract mixin class _ $ExchangeResultCopyWith < $Res > implements $ExchangeResultCopyWith < $Res > {
factory _$ExchangeResultCopyWith ( _ExchangeResult value , $Res Function ( _ExchangeResult ) _then ) = __$ExchangeResultCopyWithImpl ;
@ override @ useResult
$Res call ({
int coins , int points , int coinBalance , int pointBalance , List < WalletLot > lots , bool replayed
});
}
/// @nodoc
class __ $ExchangeResultCopyWithImpl < $Res >
implements _$ExchangeResultCopyWith < $Res > {
__$ExchangeResultCopyWithImpl ( this . _self , this . _then );
final _ExchangeResult _self ;
final $Res Function ( _ExchangeResult ) _then ;
/// Create a copy of ExchangeResult
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? coins = null , Object ? points = null , Object ? coinBalance = null , Object ? pointBalance = null , Object ? lots = null , Object ? replayed = null ,}) {
return _then ( _ExchangeResult (
coins: null == coins ? _self . coins : coins // ignore: cast_nullable_to_non_nullable
as int , points: null == points ? _self . points : points // ignore: cast_nullable_to_non_nullable
as int , coinBalance: null == coinBalance ? _self . coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int , pointBalance: null == pointBalance ? _self . pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int , lots: null == lots ? _self . _lots : lots // ignore: cast_nullable_to_non_nullable
as List < WalletLot > , replayed: null == replayed ? _self . replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool ,
));
}
}
/// @nodoc
mixin _$WalletLot {
int get amount ; DateTime ? get expiresAt ;
/// Create a copy of WalletLot
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$WalletLotCopyWith < WalletLot > get copyWith => _$WalletLotCopyWithImpl < WalletLot > ( this as WalletLot , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as WalletLot ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is WalletLot && ( identical ( other . amount , _this . amount ) || other . amount == _this . amount ) && ( identical ( other . expiresAt , _this . expiresAt ) || other . expiresAt == _this . expiresAt ));
}
@ override
int get hashCode {
final _this = this as WalletLot ;
return Object . hash ( runtimeType , _this . amount , _this . expiresAt );
}
@ override
String toString () {
final _this = this as WalletLot ;
return 'WalletLot(amount: ${ _this . amount } , expiresAt: ${ _this . expiresAt } )' ;
}
}
/// @nodoc
abstract mixin class $WalletLotCopyWith < $Res > {
factory $WalletLotCopyWith ( WalletLot value , $Res Function ( WalletLot ) _then ) = _$WalletLotCopyWithImpl ;
@ useResult
$Res call ({
int amount , DateTime ? expiresAt
});
}
/// @nodoc
class _ $WalletLotCopyWithImpl < $Res >
implements $WalletLotCopyWith < $Res > {
_$WalletLotCopyWithImpl ( this . _self , this . _then );
final WalletLot _self ;
final $Res Function ( WalletLot ) _then ;
/// Create a copy of WalletLot
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? amount = null , Object ? expiresAt = freezed ,}) {
return _then ( WalletLot (
amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , expiresAt: freezed == expiresAt ? _self . expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// Adds pattern-matching-related methods to [WalletLot].
extension WalletLotPatterns on WalletLot {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _WalletLot value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _WalletLot () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _WalletLot value ) $default ,){
final _that = this ;
switch ( _that ) {
case _WalletLot () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _WalletLot value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _WalletLot () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( int amount , DateTime ? expiresAt ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _WalletLot () when $default != null :
return $default ( _that . amount , _that . expiresAt ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( int amount , DateTime ? expiresAt ) $default ,) { final _that = this ;
switch ( _that ) {
case _WalletLot () :
return $default ( _that . amount , _that . expiresAt ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( int amount , DateTime ? expiresAt ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _WalletLot () when $default != null :
return $default ( _that . amount , _that . expiresAt ); case _:
return null ;
}
}
}
/// @nodoc
class _WalletLot implements WalletLot {
const _WalletLot ({ required this . amount , this . expiresAt });
@ override final int amount ;
@ override final DateTime ? expiresAt ;
/// Create a copy of WalletLot
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$WalletLotCopyWith < _WalletLot > get copyWith => __$WalletLotCopyWithImpl < _WalletLot > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _WalletLot && ( identical ( other . amount , amount ) || other . amount == amount ) && ( identical ( other . expiresAt , expiresAt ) || other . expiresAt == expiresAt ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , amount , expiresAt );
}
@ override
String toString () {
return 'WalletLot(amount: $ amount , expiresAt: $ expiresAt )' ;
}
}
/// @nodoc
abstract mixin class _ $WalletLotCopyWith < $Res > implements $WalletLotCopyWith < $Res > {
factory _$WalletLotCopyWith ( _WalletLot value , $Res Function ( _WalletLot ) _then ) = __$WalletLotCopyWithImpl ;
@ override @ useResult
$Res call ({
int amount , DateTime ? expiresAt
});
}
/// @nodoc
class __ $WalletLotCopyWithImpl < $Res >
implements _$WalletLotCopyWith < $Res > {
__$WalletLotCopyWithImpl ( this . _self , this . _then );
final _WalletLot _self ;
final $Res Function ( _WalletLot ) _then ;
/// Create a copy of WalletLot
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? amount = null , Object ? expiresAt = freezed ,}) {
return _then ( _WalletLot (
amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , expiresAt: freezed == expiresAt ? _self . expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// @nodoc
mixin _$TransferRecipient {
String get name ; String get phoneNumber ;
/// Create a copy of TransferRecipient
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$TransferRecipientCopyWith < TransferRecipient > get copyWith => _$TransferRecipientCopyWithImpl < TransferRecipient > ( this as TransferRecipient , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as TransferRecipient ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is TransferRecipient && ( identical ( other . name , _this . name ) || other . name == _this . name ) && ( identical ( other . phoneNumber , _this . phoneNumber ) || other . phoneNumber == _this . phoneNumber ));
}
@ override
int get hashCode {
final _this = this as TransferRecipient ;
return Object . hash ( runtimeType , _this . name , _this . phoneNumber );
}
@ override
String toString () {
final _this = this as TransferRecipient ;
return 'TransferRecipient(name: ${ _this . name } , phoneNumber: ${ _this . phoneNumber } )' ;
}
}
/// @nodoc
abstract mixin class $TransferRecipientCopyWith < $Res > {
factory $TransferRecipientCopyWith ( TransferRecipient value , $Res Function ( TransferRecipient ) _then ) = _$TransferRecipientCopyWithImpl ;
@ useResult
$Res call ({
String name , String phoneNumber
});
}
/// @nodoc
class _ $TransferRecipientCopyWithImpl < $Res >
implements $TransferRecipientCopyWith < $Res > {
_$TransferRecipientCopyWithImpl ( this . _self , this . _then );
final TransferRecipient _self ;
final $Res Function ( TransferRecipient ) _then ;
/// Create a copy of TransferRecipient
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? name = null , Object ? phoneNumber = null ,}) {
return _then ( TransferRecipient (
name: null == name ? _self . name : name // ignore: cast_nullable_to_non_nullable
as String , phoneNumber: null == phoneNumber ? _self . phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String ,
));
}
}
/// Adds pattern-matching-related methods to [TransferRecipient].
extension TransferRecipientPatterns on TransferRecipient {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _TransferRecipient value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _TransferRecipient () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _TransferRecipient value ) $default ,){
final _that = this ;
switch ( _that ) {
case _TransferRecipient () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _TransferRecipient value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _TransferRecipient () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( String name , String phoneNumber ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _TransferRecipient () when $default != null :
return $default ( _that . name , _that . phoneNumber ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( String name , String phoneNumber ) $default ,) { final _that = this ;
switch ( _that ) {
case _TransferRecipient () :
return $default ( _that . name , _that . phoneNumber ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( String name , String phoneNumber ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _TransferRecipient () when $default != null :
return $default ( _that . name , _that . phoneNumber ); case _:
return null ;
}
}
}
/// @nodoc
class _TransferRecipient implements TransferRecipient {
const _TransferRecipient ({ required this . name , required this . phoneNumber });
@ override final String name ;
@ override final String phoneNumber ;
/// Create a copy of TransferRecipient
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$TransferRecipientCopyWith < _TransferRecipient > get copyWith => __$TransferRecipientCopyWithImpl < _TransferRecipient > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _TransferRecipient && ( identical ( other . name , name ) || other . name == name ) && ( identical ( other . phoneNumber , phoneNumber ) || other . phoneNumber == phoneNumber ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , name , phoneNumber );
}
@ override
String toString () {
return 'TransferRecipient(name: $ name , phoneNumber: $ phoneNumber )' ;
}
}
/// @nodoc
abstract mixin class _ $TransferRecipientCopyWith < $Res > implements $TransferRecipientCopyWith < $Res > {
factory _$TransferRecipientCopyWith ( _TransferRecipient value , $Res Function ( _TransferRecipient ) _then ) = __$TransferRecipientCopyWithImpl ;
@ override @ useResult
$Res call ({
String name , String phoneNumber
});
}
/// @nodoc
class __ $TransferRecipientCopyWithImpl < $Res >
implements _$TransferRecipientCopyWith < $Res > {
__$TransferRecipientCopyWithImpl ( this . _self , this . _then );
final _TransferRecipient _self ;
final $Res Function ( _TransferRecipient ) _then ;
/// Create a copy of TransferRecipient
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? name = null , Object ? phoneNumber = null ,}) {
return _then ( _TransferRecipient (
name: null == name ? _self . name : name // ignore: cast_nullable_to_non_nullable
as String , phoneNumber: null == phoneNumber ? _self . phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String ,
));
}
}
/// @nodoc
mixin _$TransferResult {
WalletCurrency get currency ; int get amount ; TransferRecipient get recipient ; List < WalletLot > get lots ; int get balance ; bool get replayed ;
/// Create a copy of TransferResult
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$TransferResultCopyWith < TransferResult > get copyWith => _$TransferResultCopyWithImpl < TransferResult > ( this as TransferResult , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as TransferResult ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is TransferResult && ( identical ( other . currency , _this . currency ) || other . currency == _this . currency ) && ( identical ( other . amount , _this . amount ) || other . amount == _this . amount ) && ( identical ( other . recipient , _this . recipient ) || other . recipient == _this . recipient ) && const DeepCollectionEquality (). equals ( other . lots , _this . lots ) && ( identical ( other . balance , _this . balance ) || other . balance == _this . balance ) && ( identical ( other . replayed , _this . replayed ) || other . replayed == _this . replayed ));
}
@ override
int get hashCode {
final _this = this as TransferResult ;
return Object . hash ( runtimeType , _this . currency , _this . amount , _this . recipient , const DeepCollectionEquality (). hash ( _this . lots ), _this . balance , _this . replayed );
}
@ override
String toString () {
final _this = this as TransferResult ;
return 'TransferResult(currency: ${ _this . currency } , amount: ${ _this . amount } , recipient: ${ _this . recipient } , lots: ${ _this . lots } , balance: ${ _this . balance } , replayed: ${ _this . replayed } )' ;
}
}
/// @nodoc
abstract mixin class $TransferResultCopyWith < $Res > {
factory $TransferResultCopyWith ( TransferResult value , $Res Function ( TransferResult ) _then ) = _$TransferResultCopyWithImpl ;
@ useResult
$Res call ({
WalletCurrency currency , int amount , TransferRecipient recipient , List < WalletLot > lots , int balance , bool replayed
});
$TransferRecipientCopyWith < $Res > get recipient ;
}
/// @nodoc
class _ $TransferResultCopyWithImpl < $Res >
implements $TransferResultCopyWith < $Res > {
_$TransferResultCopyWithImpl ( this . _self , this . _then );
final TransferResult _self ;
final $Res Function ( TransferResult ) _then ;
/// Create a copy of TransferResult
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? currency = null , Object ? amount = null , Object ? recipient = null , Object ? lots = null , Object ? balance = null , Object ? replayed = null ,}) {
return _then ( TransferResult (
currency: null == currency ? _self . currency : currency // ignore: cast_nullable_to_non_nullable
as WalletCurrency , amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , recipient: null == recipient ? _self . recipient : recipient // ignore: cast_nullable_to_non_nullable
as TransferRecipient , lots: null == lots ? _self . lots : lots // ignore: cast_nullable_to_non_nullable
as List < WalletLot > , balance: null == balance ? _self . balance : balance // ignore: cast_nullable_to_non_nullable
as int , replayed: null == replayed ? _self . replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool ,
));
}
/// Create a copy of TransferResult
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$TransferRecipientCopyWith < $Res > get recipient {
return $TransferRecipientCopyWith < $Res > ( _self . recipient , ( value ) {
return _then ( _self . copyWith ( recipient: value ));
});
}
}
/// Adds pattern-matching-related methods to [TransferResult].
extension TransferResultPatterns on TransferResult {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _TransferResult value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _TransferResult () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _TransferResult value ) $default ,){
final _that = this ;
switch ( _that ) {
case _TransferResult () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _TransferResult value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _TransferResult () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( WalletCurrency currency , int amount , TransferRecipient recipient , List < WalletLot > lots , int balance , bool replayed ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _TransferResult () when $default != null :
return $default ( _that . currency , _that . amount , _that . recipient , _that . lots , _that . balance , _that . replayed ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( WalletCurrency currency , int amount , TransferRecipient recipient , List < WalletLot > lots , int balance , bool replayed ) $default ,) { final _that = this ;
switch ( _that ) {
case _TransferResult () :
return $default ( _that . currency , _that . amount , _that . recipient , _that . lots , _that . balance , _that . replayed ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( WalletCurrency currency , int amount , TransferRecipient recipient , List < WalletLot > lots , int balance , bool replayed ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _TransferResult () when $default != null :
return $default ( _that . currency , _that . amount , _that . recipient , _that . lots , _that . balance , _that . replayed ); case _:
return null ;
}
}
}
/// @nodoc
class _TransferResult implements TransferResult {
const _TransferResult ({ required this . currency , required this . amount , required this . recipient , required List < WalletLot > lots , required this . balance , required this . replayed }) : _lots = lots ;
@ override final WalletCurrency currency ;
@ override final int amount ;
@ override final TransferRecipient recipient ;
final List < WalletLot > _lots ;
@ override List < WalletLot > get lots {
if ( _lots is EqualUnmodifiableListView ) return _lots ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _lots );
}
@ override final int balance ;
@ override final bool replayed ;
/// Create a copy of TransferResult
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$TransferResultCopyWith < _TransferResult > get copyWith => __$TransferResultCopyWithImpl < _TransferResult > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _TransferResult && ( identical ( other . currency , currency ) || other . currency == currency ) && ( identical ( other . amount , amount ) || other . amount == amount ) && ( identical ( other . recipient , recipient ) || other . recipient == recipient ) && const DeepCollectionEquality (). equals ( other . lots , _lots ) && ( identical ( other . balance , balance ) || other . balance == balance ) && ( identical ( other . replayed , replayed ) || other . replayed == replayed ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , currency , amount , recipient , const DeepCollectionEquality (). hash ( _lots ), balance , replayed );
}
@ override
String toString () {
return 'TransferResult(currency: $ currency , amount: $ amount , recipient: $ recipient , lots: $ lots , balance: $ balance , replayed: $ replayed )' ;
}
}
/// @nodoc
abstract mixin class _ $TransferResultCopyWith < $Res > implements $TransferResultCopyWith < $Res > {
factory _$TransferResultCopyWith ( _TransferResult value , $Res Function ( _TransferResult ) _then ) = __$TransferResultCopyWithImpl ;
@ override @ useResult
$Res call ({
WalletCurrency currency , int amount , TransferRecipient recipient , List < WalletLot > lots , int balance , bool replayed
});
@ override $TransferRecipientCopyWith < $Res > get recipient ;
}
/// @nodoc
class __ $TransferResultCopyWithImpl < $Res >
implements _$TransferResultCopyWith < $Res > {
__$TransferResultCopyWithImpl ( this . _self , this . _then );
final _TransferResult _self ;
final $Res Function ( _TransferResult ) _then ;
/// Create a copy of TransferResult
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? currency = null , Object ? amount = null , Object ? recipient = null , Object ? lots = null , Object ? balance = null , Object ? replayed = null ,}) {
return _then ( _TransferResult (
currency: null == currency ? _self . currency : currency // ignore: cast_nullable_to_non_nullable
as WalletCurrency , amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , recipient: null == recipient ? _self . recipient : recipient // ignore: cast_nullable_to_non_nullable
as TransferRecipient , lots: null == lots ? _self . _lots : lots // ignore: cast_nullable_to_non_nullable
as List < WalletLot > , balance: null == balance ? _self . balance : balance // ignore: cast_nullable_to_non_nullable
as int , replayed: null == replayed ? _self . replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool ,
));
}
/// Create a copy of TransferResult
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$TransferRecipientCopyWith < $Res > get recipient {
return $TransferRecipientCopyWith < $Res > ( _self . recipient , ( value ) {
return _then ( _self . copyWith ( recipient: value ));
});
}
}
/// @nodoc
mixin _$PinStatus {
bool get hasPin ; DateTime ? get lockedUntil ; DateTime ? get transferBlockedUntil ;
/// Create a copy of PinStatus
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$PinStatusCopyWith < PinStatus > get copyWith => _$PinStatusCopyWithImpl < PinStatus > ( this as PinStatus , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as PinStatus ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is PinStatus && ( identical ( other . hasPin , _this . hasPin ) || other . hasPin == _this . hasPin ) && ( identical ( other . lockedUntil , _this . lockedUntil ) || other . lockedUntil == _this . lockedUntil ) && ( identical ( other . transferBlockedUntil , _this . transferBlockedUntil ) || other . transferBlockedUntil == _this . transferBlockedUntil ));
}
@ override
int get hashCode {
final _this = this as PinStatus ;
return Object . hash ( runtimeType , _this . hasPin , _this . lockedUntil , _this . transferBlockedUntil );
}
@ override
String toString () {
final _this = this as PinStatus ;
return 'PinStatus(hasPin: ${ _this . hasPin } , lockedUntil: ${ _this . lockedUntil } , transferBlockedUntil: ${ _this . transferBlockedUntil } )' ;
}
}
/// @nodoc
abstract mixin class $PinStatusCopyWith < $Res > {
factory $PinStatusCopyWith ( PinStatus value , $Res Function ( PinStatus ) _then ) = _$PinStatusCopyWithImpl ;
@ useResult
$Res call ({
bool hasPin , DateTime ? lockedUntil , DateTime ? transferBlockedUntil
});
}
/// @nodoc
class _ $PinStatusCopyWithImpl < $Res >
implements $PinStatusCopyWith < $Res > {
_$PinStatusCopyWithImpl ( this . _self , this . _then );
final PinStatus _self ;
final $Res Function ( PinStatus ) _then ;
/// Create a copy of PinStatus
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? hasPin = null , Object ? lockedUntil = freezed , Object ? transferBlockedUntil = freezed ,}) {
return _then ( PinStatus (
hasPin: null == hasPin ? _self . hasPin : hasPin // ignore: cast_nullable_to_non_nullable
as bool , lockedUntil: freezed == lockedUntil ? _self . lockedUntil : lockedUntil // ignore: cast_nullable_to_non_nullable
as DateTime ? , transferBlockedUntil: freezed == transferBlockedUntil ? _self . transferBlockedUntil : transferBlockedUntil // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// Adds pattern-matching-related methods to [PinStatus].
extension PinStatusPatterns on PinStatus {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _PinStatus value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _PinStatus () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _PinStatus value ) $default ,){
final _that = this ;
switch ( _that ) {
case _PinStatus () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _PinStatus value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _PinStatus () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( bool hasPin , DateTime ? lockedUntil , DateTime ? transferBlockedUntil ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _PinStatus () when $default != null :
return $default ( _that . hasPin , _that . lockedUntil , _that . transferBlockedUntil ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( bool hasPin , DateTime ? lockedUntil , DateTime ? transferBlockedUntil ) $default ,) { final _that = this ;
switch ( _that ) {
case _PinStatus () :
return $default ( _that . hasPin , _that . lockedUntil , _that . transferBlockedUntil ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( bool hasPin , DateTime ? lockedUntil , DateTime ? transferBlockedUntil ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _PinStatus () when $default != null :
return $default ( _that . hasPin , _that . lockedUntil , _that . transferBlockedUntil ); case _:
return null ;
}
}
}
/// @nodoc
class _PinStatus extends PinStatus {
const _PinStatus ({ required this . hasPin , this . lockedUntil , this . transferBlockedUntil }) : super . _ ();
@ override final bool hasPin ;
@ override final DateTime ? lockedUntil ;
@ override final DateTime ? transferBlockedUntil ;
/// Create a copy of PinStatus
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$PinStatusCopyWith < _PinStatus > get copyWith => __$PinStatusCopyWithImpl < _PinStatus > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _PinStatus && ( identical ( other . hasPin , hasPin ) || other . hasPin == hasPin ) && ( identical ( other . lockedUntil , lockedUntil ) || other . lockedUntil == lockedUntil ) && ( identical ( other . transferBlockedUntil , transferBlockedUntil ) || other . transferBlockedUntil == transferBlockedUntil ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , hasPin , lockedUntil , transferBlockedUntil );
}
@ override
String toString () {
return 'PinStatus(hasPin: $ hasPin , lockedUntil: $ lockedUntil , transferBlockedUntil: $ transferBlockedUntil )' ;
}
}
/// @nodoc
abstract mixin class _ $PinStatusCopyWith < $Res > implements $PinStatusCopyWith < $Res > {
factory _$PinStatusCopyWith ( _PinStatus value , $Res Function ( _PinStatus ) _then ) = __$PinStatusCopyWithImpl ;
@ override @ useResult
$Res call ({
bool hasPin , DateTime ? lockedUntil , DateTime ? transferBlockedUntil
});
}
/// @nodoc
class __ $PinStatusCopyWithImpl < $Res >
implements _$PinStatusCopyWith < $Res > {
__$PinStatusCopyWithImpl ( this . _self , this . _then );
final _PinStatus _self ;
final $Res Function ( _PinStatus ) _then ;
/// Create a copy of PinStatus
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? hasPin = null , Object ? lockedUntil = freezed , Object ? transferBlockedUntil = freezed ,}) {
return _then ( _PinStatus (
hasPin: null == hasPin ? _self . hasPin : hasPin // ignore: cast_nullable_to_non_nullable
as bool , lockedUntil: freezed == lockedUntil ? _self . lockedUntil : lockedUntil // ignore: cast_nullable_to_non_nullable
as DateTime ? , transferBlockedUntil: freezed == transferBlockedUntil ? _self . transferBlockedUntil : transferBlockedUntil // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// @nodoc
mixin _$PinOtp {
PinOtpPurpose get purpose ; String get otpToken ; DateTime ? get expiresAt ;
/// Create a copy of PinOtp
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$PinOtpCopyWith < PinOtp > get copyWith => _$PinOtpCopyWithImpl < PinOtp > ( this as PinOtp , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as PinOtp ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is PinOtp && ( identical ( other . purpose , _this . purpose ) || other . purpose == _this . purpose ) && ( identical ( other . otpToken , _this . otpToken ) || other . otpToken == _this . otpToken ) && ( identical ( other . expiresAt , _this . expiresAt ) || other . expiresAt == _this . expiresAt ));
}
@ override
int get hashCode {
final _this = this as PinOtp ;
return Object . hash ( runtimeType , _this . purpose , _this . otpToken , _this . expiresAt );
}
@ override
String toString () {
final _this = this as PinOtp ;
return 'PinOtp(purpose: ${ _this . purpose } , otpToken: ${ _this . otpToken } , expiresAt: ${ _this . expiresAt } )' ;
}
}
/// @nodoc
abstract mixin class $PinOtpCopyWith < $Res > {
factory $PinOtpCopyWith ( PinOtp value , $Res Function ( PinOtp ) _then ) = _$PinOtpCopyWithImpl ;
@ useResult
$Res call ({
PinOtpPurpose purpose , String otpToken , DateTime ? expiresAt
});
}
/// @nodoc
class _ $PinOtpCopyWithImpl < $Res >
implements $PinOtpCopyWith < $Res > {
_$PinOtpCopyWithImpl ( this . _self , this . _then );
final PinOtp _self ;
final $Res Function ( PinOtp ) _then ;
/// Create a copy of PinOtp
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? purpose = null , Object ? otpToken = null , Object ? expiresAt = freezed ,}) {
return _then ( PinOtp (
purpose: null == purpose ? _self . purpose : purpose // ignore: cast_nullable_to_non_nullable
as PinOtpPurpose , otpToken: null == otpToken ? _self . otpToken : otpToken // ignore: cast_nullable_to_non_nullable
as String , expiresAt: freezed == expiresAt ? _self . expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// Adds pattern-matching-related methods to [PinOtp].
extension PinOtpPatterns on PinOtp {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _PinOtp value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _PinOtp () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _PinOtp value ) $default ,){
final _that = this ;
switch ( _that ) {
case _PinOtp () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _PinOtp value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _PinOtp () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( PinOtpPurpose purpose , String otpToken , DateTime ? expiresAt ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _PinOtp () when $default != null :
return $default ( _that . purpose , _that . otpToken , _that . expiresAt ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( PinOtpPurpose purpose , String otpToken , DateTime ? expiresAt ) $default ,) { final _that = this ;
switch ( _that ) {
case _PinOtp () :
return $default ( _that . purpose , _that . otpToken , _that . expiresAt ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( PinOtpPurpose purpose , String otpToken , DateTime ? expiresAt ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _PinOtp () when $default != null :
return $default ( _that . purpose , _that . otpToken , _that . expiresAt ); case _:
return null ;
}
}
}
/// @nodoc
class _PinOtp implements PinOtp {
const _PinOtp ({ required this . purpose , required this . otpToken , this . expiresAt });
@ override final PinOtpPurpose purpose ;
@ override final String otpToken ;
@ override final DateTime ? expiresAt ;
/// Create a copy of PinOtp
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$PinOtpCopyWith < _PinOtp > get copyWith => __$PinOtpCopyWithImpl < _PinOtp > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _PinOtp && ( identical ( other . purpose , purpose ) || other . purpose == purpose ) && ( identical ( other . otpToken , otpToken ) || other . otpToken == otpToken ) && ( identical ( other . expiresAt , expiresAt ) || other . expiresAt == expiresAt ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , purpose , otpToken , expiresAt );
}
@ override
String toString () {
return 'PinOtp(purpose: $ purpose , otpToken: $ otpToken , expiresAt: $ expiresAt )' ;
}
}
/// @nodoc
abstract mixin class _ $PinOtpCopyWith < $Res > implements $PinOtpCopyWith < $Res > {
factory _$PinOtpCopyWith ( _PinOtp value , $Res Function ( _PinOtp ) _then ) = __$PinOtpCopyWithImpl ;
@ override @ useResult
$Res call ({
PinOtpPurpose purpose , String otpToken , DateTime ? expiresAt
});
}
/// @nodoc
class __ $PinOtpCopyWithImpl < $Res >
implements _$PinOtpCopyWith < $Res > {
__$PinOtpCopyWithImpl ( this . _self , this . _then );
final _PinOtp _self ;
final $Res Function ( _PinOtp ) _then ;
/// Create a copy of PinOtp
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? purpose = null , Object ? otpToken = null , Object ? expiresAt = freezed ,}) {
return _then ( _PinOtp (
purpose: null == purpose ? _self . purpose : purpose // ignore: cast_nullable_to_non_nullable
as PinOtpPurpose , otpToken: null == otpToken ? _self . otpToken : otpToken // ignore: cast_nullable_to_non_nullable
as String , expiresAt: freezed == expiresAt ? _self . expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// @nodoc
mixin _$Outlet {
2026-10-10 02:33:16 +07:00
String get id ; String get name ; String ? get address ; /// Belanja di outlet ini memberi EnakPoint.
2026-10-01 01:43:22 +07:00
bool get earnsPoints ; /// Belanja di outlet ini memberi EnakCoin.
bool get earnsCoins ;
/// Create a copy of Outlet
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$OutletCopyWith < Outlet > get copyWith => _$OutletCopyWithImpl < Outlet > ( this as Outlet , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as Outlet ;
2026-10-10 02:33:16 +07:00
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is Outlet && ( identical ( other . id , _this . id ) || other . id == _this . id ) && ( identical ( other . name , _this . name ) || other . name == _this . name ) && ( identical ( other . address , _this . address ) || other . address == _this . address ) && ( identical ( other . earnsPoints , _this . earnsPoints ) || other . earnsPoints == _this . earnsPoints ) && ( identical ( other . earnsCoins , _this . earnsCoins ) || other . earnsCoins == _this . earnsCoins ));
2026-10-01 01:43:22 +07:00
}
@ override
int get hashCode {
final _this = this as Outlet ;
2026-10-10 02:33:16 +07:00
return Object . hash ( runtimeType , _this . id , _this . name , _this . address , _this . earnsPoints , _this . earnsCoins );
2026-10-01 01:43:22 +07:00
}
@ override
String toString () {
final _this = this as Outlet ;
2026-10-10 02:33:16 +07:00
return 'Outlet(id: ${ _this . id } , name: ${ _this . name } , address: ${ _this . address } , earnsPoints: ${ _this . earnsPoints } , earnsCoins: ${ _this . earnsCoins } )' ;
2026-10-01 01:43:22 +07:00
}
}
/// @nodoc
abstract mixin class $OutletCopyWith < $Res > {
factory $OutletCopyWith ( Outlet value , $Res Function ( Outlet ) _then ) = _$OutletCopyWithImpl ;
@ useResult
$Res call ({
2026-10-10 02:33:16 +07:00
String id , String name , String ? address , bool earnsPoints , bool earnsCoins
2026-10-01 01:43:22 +07:00
});
}
/// @nodoc
class _ $OutletCopyWithImpl < $Res >
implements $OutletCopyWith < $Res > {
_$OutletCopyWithImpl ( this . _self , this . _then );
final Outlet _self ;
final $Res Function ( Outlet ) _then ;
/// Create a copy of Outlet
/// with the given fields replaced by the non-null parameter values.
2026-10-10 02:33:16 +07:00
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? id = null , Object ? name = null , Object ? address = freezed , Object ? earnsPoints = null , Object ? earnsCoins = null ,}) {
2026-10-01 01:43:22 +07:00
return _then ( Outlet (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , name: null == name ? _self . name : name // ignore: cast_nullable_to_non_nullable
as String , address: freezed == address ? _self . address : address // ignore: cast_nullable_to_non_nullable
2026-10-10 02:33:16 +07:00
as String ? , earnsPoints: null == earnsPoints ? _self . earnsPoints : earnsPoints // ignore: cast_nullable_to_non_nullable
2026-10-01 01:43:22 +07:00
as bool , earnsCoins: null == earnsCoins ? _self . earnsCoins : earnsCoins // ignore: cast_nullable_to_non_nullable
as bool ,
));
}
}
/// Adds pattern-matching-related methods to [Outlet].
extension OutletPatterns on Outlet {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _Outlet value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _Outlet () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _Outlet value ) $default ,){
final _that = this ;
switch ( _that ) {
case _Outlet () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _Outlet value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _Outlet () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
2026-10-10 02:33:16 +07:00
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( String id , String name , String ? address , bool earnsPoints , bool earnsCoins ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
2026-10-01 01:43:22 +07:00
switch ( _that ) {
case _Outlet () when $default != null :
2026-10-10 02:33:16 +07:00
return $default ( _that . id , _that . name , _that . address , _that . earnsPoints , _that . earnsCoins ); case _:
2026-10-01 01:43:22 +07:00
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
2026-10-10 02:33:16 +07:00
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( String id , String name , String ? address , bool earnsPoints , bool earnsCoins ) $default ,) { final _that = this ;
2026-10-01 01:43:22 +07:00
switch ( _that ) {
case _Outlet () :
2026-10-10 02:33:16 +07:00
return $default ( _that . id , _that . name , _that . address , _that . earnsPoints , _that . earnsCoins ); case _:
2026-10-01 01:43:22 +07:00
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
2026-10-10 02:33:16 +07:00
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( String id , String name , String ? address , bool earnsPoints , bool earnsCoins ) ? $default ,) { final _that = this ;
2026-10-01 01:43:22 +07:00
switch ( _that ) {
case _Outlet () when $default != null :
2026-10-10 02:33:16 +07:00
return $default ( _that . id , _that . name , _that . address , _that . earnsPoints , _that . earnsCoins ); case _:
2026-10-01 01:43:22 +07:00
return null ;
}
}
}
/// @nodoc
class _Outlet implements Outlet {
2026-10-10 02:33:16 +07:00
const _Outlet ({ required this . id , required this . name , this . address , required this . earnsPoints , required this . earnsCoins });
2026-10-01 01:43:22 +07:00
@ override final String id ;
@ override final String name ;
@ override final String ? address ;
/// Belanja di outlet ini memberi EnakPoint.
@ override final bool earnsPoints ;
/// Belanja di outlet ini memberi EnakCoin.
@ override final bool earnsCoins ;
/// Create a copy of Outlet
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$OutletCopyWith < _Outlet > get copyWith => __$OutletCopyWithImpl < _Outlet > ( this , _$identity );
@ override
bool operator == ( Object other ) {
2026-10-10 02:33:16 +07:00
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _Outlet && ( identical ( other . id , id ) || other . id == id ) && ( identical ( other . name , name ) || other . name == name ) && ( identical ( other . address , address ) || other . address == address ) && ( identical ( other . earnsPoints , earnsPoints ) || other . earnsPoints == earnsPoints ) && ( identical ( other . earnsCoins , earnsCoins ) || other . earnsCoins == earnsCoins ));
2026-10-01 01:43:22 +07:00
}
@ override
int get hashCode {
2026-10-10 02:33:16 +07:00
return Object . hash ( runtimeType , id , name , address , earnsPoints , earnsCoins );
2026-10-01 01:43:22 +07:00
}
@ override
String toString () {
2026-10-10 02:33:16 +07:00
return 'Outlet(id: $ id , name: $ name , address: $ address , earnsPoints: $ earnsPoints , earnsCoins: $ earnsCoins )' ;
2026-10-01 01:43:22 +07:00
}
}
/// @nodoc
abstract mixin class _ $OutletCopyWith < $Res > implements $OutletCopyWith < $Res > {
factory _$OutletCopyWith ( _Outlet value , $Res Function ( _Outlet ) _then ) = __$OutletCopyWithImpl ;
@ override @ useResult
$Res call ({
2026-10-10 02:33:16 +07:00
String id , String name , String ? address , bool earnsPoints , bool earnsCoins
2026-10-01 01:43:22 +07:00
});
}
/// @nodoc
class __ $OutletCopyWithImpl < $Res >
implements _$OutletCopyWith < $Res > {
__$OutletCopyWithImpl ( this . _self , this . _then );
final _Outlet _self ;
final $Res Function ( _Outlet ) _then ;
/// Create a copy of Outlet
/// with the given fields replaced by the non-null parameter values.
2026-10-10 02:33:16 +07:00
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? id = null , Object ? name = null , Object ? address = freezed , Object ? earnsPoints = null , Object ? earnsCoins = null ,}) {
2026-10-01 01:43:22 +07:00
return _then ( _Outlet (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , name: null == name ? _self . name : name // ignore: cast_nullable_to_non_nullable
as String , address: freezed == address ? _self . address : address // ignore: cast_nullable_to_non_nullable
2026-10-10 02:33:16 +07:00
as String ? , earnsPoints: null == earnsPoints ? _self . earnsPoints : earnsPoints // ignore: cast_nullable_to_non_nullable
2026-10-01 01:43:22 +07:00
as bool , earnsCoins: null == earnsCoins ? _self . earnsCoins : earnsCoins // ignore: cast_nullable_to_non_nullable
as bool ,
));
}
}
/// @nodoc
mixin _$CustomerOrder {
String get id ; String get orderNumber ; String get outletName ; String get orderType ; String get status ; String get paymentStatus ; int get totalAmount ; int get itemCount ; bool get isVoid ; bool get isRefund ; int get pointsEarned ; int get coinsEarned ; DateTime ? get createdAt ;
/// Create a copy of CustomerOrder
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$CustomerOrderCopyWith < CustomerOrder > get copyWith => _$CustomerOrderCopyWithImpl < CustomerOrder > ( this as CustomerOrder , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as CustomerOrder ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is CustomerOrder && ( identical ( other . id , _this . id ) || other . id == _this . id ) && ( identical ( other . orderNumber , _this . orderNumber ) || other . orderNumber == _this . orderNumber ) && ( identical ( other . outletName , _this . outletName ) || other . outletName == _this . outletName ) && ( identical ( other . orderType , _this . orderType ) || other . orderType == _this . orderType ) && ( identical ( other . status , _this . status ) || other . status == _this . status ) && ( identical ( other . paymentStatus , _this . paymentStatus ) || other . paymentStatus == _this . paymentStatus ) && ( identical ( other . totalAmount , _this . totalAmount ) || other . totalAmount == _this . totalAmount ) && ( identical ( other . itemCount , _this . itemCount ) || other . itemCount == _this . itemCount ) && ( identical ( other . isVoid , _this . isVoid ) || other . isVoid == _this . isVoid ) && ( identical ( other . isRefund , _this . isRefund ) || other . isRefund == _this . isRefund ) && ( identical ( other . pointsEarned , _this . pointsEarned ) || other . pointsEarned == _this . pointsEarned ) && ( identical ( other . coinsEarned , _this . coinsEarned ) || other . coinsEarned == _this . coinsEarned ) && ( identical ( other . createdAt , _this . createdAt ) || other . createdAt == _this . createdAt ));
}
@ override
int get hashCode {
final _this = this as CustomerOrder ;
return Object . hash ( runtimeType , _this . id , _this . orderNumber , _this . outletName , _this . orderType , _this . status , _this . paymentStatus , _this . totalAmount , _this . itemCount , _this . isVoid , _this . isRefund , _this . pointsEarned , _this . coinsEarned , _this . createdAt );
}
@ override
String toString () {
final _this = this as CustomerOrder ;
return 'CustomerOrder(id: ${ _this . id } , orderNumber: ${ _this . orderNumber } , outletName: ${ _this . outletName } , orderType: ${ _this . orderType } , status: ${ _this . status } , paymentStatus: ${ _this . paymentStatus } , totalAmount: ${ _this . totalAmount } , itemCount: ${ _this . itemCount } , isVoid: ${ _this . isVoid } , isRefund: ${ _this . isRefund } , pointsEarned: ${ _this . pointsEarned } , coinsEarned: ${ _this . coinsEarned } , createdAt: ${ _this . createdAt } )' ;
}
}
/// @nodoc
abstract mixin class $CustomerOrderCopyWith < $Res > {
factory $CustomerOrderCopyWith ( CustomerOrder value , $Res Function ( CustomerOrder ) _then ) = _$CustomerOrderCopyWithImpl ;
@ useResult
$Res call ({
String id , String orderNumber , String outletName , String orderType , String status , String paymentStatus , int totalAmount , int itemCount , bool isVoid , bool isRefund , int pointsEarned , int coinsEarned , DateTime ? createdAt
});
}
/// @nodoc
class _ $CustomerOrderCopyWithImpl < $Res >
implements $CustomerOrderCopyWith < $Res > {
_$CustomerOrderCopyWithImpl ( this . _self , this . _then );
final CustomerOrder _self ;
final $Res Function ( CustomerOrder ) _then ;
/// Create a copy of CustomerOrder
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? id = null , Object ? orderNumber = null , Object ? outletName = null , Object ? orderType = null , Object ? status = null , Object ? paymentStatus = null , Object ? totalAmount = null , Object ? itemCount = null , Object ? isVoid = null , Object ? isRefund = null , Object ? pointsEarned = null , Object ? coinsEarned = null , Object ? createdAt = freezed ,}) {
return _then ( CustomerOrder (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , orderNumber: null == orderNumber ? _self . orderNumber : orderNumber // ignore: cast_nullable_to_non_nullable
as String , outletName: null == outletName ? _self . outletName : outletName // ignore: cast_nullable_to_non_nullable
as String , orderType: null == orderType ? _self . orderType : orderType // ignore: cast_nullable_to_non_nullable
as String , status: null == status ? _self . status : status // ignore: cast_nullable_to_non_nullable
as String , paymentStatus: null == paymentStatus ? _self . paymentStatus : paymentStatus // ignore: cast_nullable_to_non_nullable
as String , totalAmount: null == totalAmount ? _self . totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
as int , itemCount: null == itemCount ? _self . itemCount : itemCount // ignore: cast_nullable_to_non_nullable
as int , isVoid: null == isVoid ? _self . isVoid : isVoid // ignore: cast_nullable_to_non_nullable
as bool , isRefund: null == isRefund ? _self . isRefund : isRefund // ignore: cast_nullable_to_non_nullable
as bool , pointsEarned: null == pointsEarned ? _self . pointsEarned : pointsEarned // ignore: cast_nullable_to_non_nullable
as int , coinsEarned: null == coinsEarned ? _self . coinsEarned : coinsEarned // ignore: cast_nullable_to_non_nullable
as int , createdAt: freezed == createdAt ? _self . createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// Adds pattern-matching-related methods to [CustomerOrder].
extension CustomerOrderPatterns on CustomerOrder {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _CustomerOrder value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _CustomerOrder () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _CustomerOrder value ) $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrder () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _CustomerOrder value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrder () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( String id , String orderNumber , String outletName , String orderType , String status , String paymentStatus , int totalAmount , int itemCount , bool isVoid , bool isRefund , int pointsEarned , int coinsEarned , DateTime ? createdAt ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _CustomerOrder () when $default != null :
return $default ( _that . id , _that . orderNumber , _that . outletName , _that . orderType , _that . status , _that . paymentStatus , _that . totalAmount , _that . itemCount , _that . isVoid , _that . isRefund , _that . pointsEarned , _that . coinsEarned , _that . createdAt ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( String id , String orderNumber , String outletName , String orderType , String status , String paymentStatus , int totalAmount , int itemCount , bool isVoid , bool isRefund , int pointsEarned , int coinsEarned , DateTime ? createdAt ) $default ,) { final _that = this ;
switch ( _that ) {
case _CustomerOrder () :
return $default ( _that . id , _that . orderNumber , _that . outletName , _that . orderType , _that . status , _that . paymentStatus , _that . totalAmount , _that . itemCount , _that . isVoid , _that . isRefund , _that . pointsEarned , _that . coinsEarned , _that . createdAt ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( String id , String orderNumber , String outletName , String orderType , String status , String paymentStatus , int totalAmount , int itemCount , bool isVoid , bool isRefund , int pointsEarned , int coinsEarned , DateTime ? createdAt ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _CustomerOrder () when $default != null :
return $default ( _that . id , _that . orderNumber , _that . outletName , _that . orderType , _that . status , _that . paymentStatus , _that . totalAmount , _that . itemCount , _that . isVoid , _that . isRefund , _that . pointsEarned , _that . coinsEarned , _that . createdAt ); case _:
return null ;
}
}
}
/// @nodoc
class _CustomerOrder extends CustomerOrder {
const _CustomerOrder ({ required this . id , required this . orderNumber , required this . outletName , required this . orderType , required this . status , required this . paymentStatus , required this . totalAmount , required this . itemCount , required this . isVoid , required this . isRefund , required this . pointsEarned , required this . coinsEarned , this . createdAt }) : super . _ ();
@ override final String id ;
@ override final String orderNumber ;
@ override final String outletName ;
@ override final String orderType ;
@ override final String status ;
@ override final String paymentStatus ;
@ override final int totalAmount ;
@ override final int itemCount ;
@ override final bool isVoid ;
@ override final bool isRefund ;
@ override final int pointsEarned ;
@ override final int coinsEarned ;
@ override final DateTime ? createdAt ;
/// Create a copy of CustomerOrder
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$CustomerOrderCopyWith < _CustomerOrder > get copyWith => __$CustomerOrderCopyWithImpl < _CustomerOrder > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _CustomerOrder && ( identical ( other . id , id ) || other . id == id ) && ( identical ( other . orderNumber , orderNumber ) || other . orderNumber == orderNumber ) && ( identical ( other . outletName , outletName ) || other . outletName == outletName ) && ( identical ( other . orderType , orderType ) || other . orderType == orderType ) && ( identical ( other . status , status ) || other . status == status ) && ( identical ( other . paymentStatus , paymentStatus ) || other . paymentStatus == paymentStatus ) && ( identical ( other . totalAmount , totalAmount ) || other . totalAmount == totalAmount ) && ( identical ( other . itemCount , itemCount ) || other . itemCount == itemCount ) && ( identical ( other . isVoid , isVoid ) || other . isVoid == isVoid ) && ( identical ( other . isRefund , isRefund ) || other . isRefund == isRefund ) && ( identical ( other . pointsEarned , pointsEarned ) || other . pointsEarned == pointsEarned ) && ( identical ( other . coinsEarned , coinsEarned ) || other . coinsEarned == coinsEarned ) && ( identical ( other . createdAt , createdAt ) || other . createdAt == createdAt ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , id , orderNumber , outletName , orderType , status , paymentStatus , totalAmount , itemCount , isVoid , isRefund , pointsEarned , coinsEarned , createdAt );
}
@ override
String toString () {
return 'CustomerOrder(id: $ id , orderNumber: $ orderNumber , outletName: $ outletName , orderType: $ orderType , status: $ status , paymentStatus: $ paymentStatus , totalAmount: $ totalAmount , itemCount: $ itemCount , isVoid: $ isVoid , isRefund: $ isRefund , pointsEarned: $ pointsEarned , coinsEarned: $ coinsEarned , createdAt: $ createdAt )' ;
}
}
/// @nodoc
abstract mixin class _ $CustomerOrderCopyWith < $Res > implements $CustomerOrderCopyWith < $Res > {
factory _$CustomerOrderCopyWith ( _CustomerOrder value , $Res Function ( _CustomerOrder ) _then ) = __$CustomerOrderCopyWithImpl ;
@ override @ useResult
$Res call ({
String id , String orderNumber , String outletName , String orderType , String status , String paymentStatus , int totalAmount , int itemCount , bool isVoid , bool isRefund , int pointsEarned , int coinsEarned , DateTime ? createdAt
});
}
/// @nodoc
class __ $CustomerOrderCopyWithImpl < $Res >
implements _$CustomerOrderCopyWith < $Res > {
__$CustomerOrderCopyWithImpl ( this . _self , this . _then );
final _CustomerOrder _self ;
final $Res Function ( _CustomerOrder ) _then ;
/// Create a copy of CustomerOrder
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? id = null , Object ? orderNumber = null , Object ? outletName = null , Object ? orderType = null , Object ? status = null , Object ? paymentStatus = null , Object ? totalAmount = null , Object ? itemCount = null , Object ? isVoid = null , Object ? isRefund = null , Object ? pointsEarned = null , Object ? coinsEarned = null , Object ? createdAt = freezed ,}) {
return _then ( _CustomerOrder (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , orderNumber: null == orderNumber ? _self . orderNumber : orderNumber // ignore: cast_nullable_to_non_nullable
as String , outletName: null == outletName ? _self . outletName : outletName // ignore: cast_nullable_to_non_nullable
as String , orderType: null == orderType ? _self . orderType : orderType // ignore: cast_nullable_to_non_nullable
as String , status: null == status ? _self . status : status // ignore: cast_nullable_to_non_nullable
as String , paymentStatus: null == paymentStatus ? _self . paymentStatus : paymentStatus // ignore: cast_nullable_to_non_nullable
as String , totalAmount: null == totalAmount ? _self . totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
as int , itemCount: null == itemCount ? _self . itemCount : itemCount // ignore: cast_nullable_to_non_nullable
as int , isVoid: null == isVoid ? _self . isVoid : isVoid // ignore: cast_nullable_to_non_nullable
as bool , isRefund: null == isRefund ? _self . isRefund : isRefund // ignore: cast_nullable_to_non_nullable
as bool , pointsEarned: null == pointsEarned ? _self . pointsEarned : pointsEarned // ignore: cast_nullable_to_non_nullable
as int , coinsEarned: null == coinsEarned ? _self . coinsEarned : coinsEarned // ignore: cast_nullable_to_non_nullable
as int , createdAt: freezed == createdAt ? _self . createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// @nodoc
mixin _$CustomerOrderPage {
List < CustomerOrder > get items ; int get page ; int get totalPages ;
/// Create a copy of CustomerOrderPage
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$CustomerOrderPageCopyWith < CustomerOrderPage > get copyWith => _$CustomerOrderPageCopyWithImpl < CustomerOrderPage > ( this as CustomerOrderPage , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as CustomerOrderPage ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is CustomerOrderPage && const DeepCollectionEquality (). equals ( other . items , _this . items ) && ( identical ( other . page , _this . page ) || other . page == _this . page ) && ( identical ( other . totalPages , _this . totalPages ) || other . totalPages == _this . totalPages ));
}
@ override
int get hashCode {
final _this = this as CustomerOrderPage ;
return Object . hash ( runtimeType , const DeepCollectionEquality (). hash ( _this . items ), _this . page , _this . totalPages );
}
@ override
String toString () {
final _this = this as CustomerOrderPage ;
return 'CustomerOrderPage(items: ${ _this . items } , page: ${ _this . page } , totalPages: ${ _this . totalPages } )' ;
}
}
/// @nodoc
abstract mixin class $CustomerOrderPageCopyWith < $Res > {
factory $CustomerOrderPageCopyWith ( CustomerOrderPage value , $Res Function ( CustomerOrderPage ) _then ) = _$CustomerOrderPageCopyWithImpl ;
@ useResult
$Res call ({
List < CustomerOrder > items , int page , int totalPages
});
}
/// @nodoc
class _ $CustomerOrderPageCopyWithImpl < $Res >
implements $CustomerOrderPageCopyWith < $Res > {
_$CustomerOrderPageCopyWithImpl ( this . _self , this . _then );
final CustomerOrderPage _self ;
final $Res Function ( CustomerOrderPage ) _then ;
/// Create a copy of CustomerOrderPage
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? items = null , Object ? page = null , Object ? totalPages = null ,}) {
return _then ( CustomerOrderPage (
items: null == items ? _self . items : items // ignore: cast_nullable_to_non_nullable
as List < CustomerOrder > , page: null == page ? _self . page : page // ignore: cast_nullable_to_non_nullable
as int , totalPages: null == totalPages ? _self . totalPages : totalPages // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// Adds pattern-matching-related methods to [CustomerOrderPage].
extension CustomerOrderPagePatterns on CustomerOrderPage {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _CustomerOrderPage value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _CustomerOrderPage () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _CustomerOrderPage value ) $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrderPage () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _CustomerOrderPage value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrderPage () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( List < CustomerOrder > items , int page , int totalPages ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _CustomerOrderPage () when $default != null :
return $default ( _that . items , _that . page , _that . totalPages ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( List < CustomerOrder > items , int page , int totalPages ) $default ,) { final _that = this ;
switch ( _that ) {
case _CustomerOrderPage () :
return $default ( _that . items , _that . page , _that . totalPages ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( List < CustomerOrder > items , int page , int totalPages ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _CustomerOrderPage () when $default != null :
return $default ( _that . items , _that . page , _that . totalPages ); case _:
return null ;
}
}
}
/// @nodoc
class _CustomerOrderPage implements CustomerOrderPage {
const _CustomerOrderPage ({ required List < CustomerOrder > items , required this . page , required this . totalPages }) : _items = items ;
final List < CustomerOrder > _items ;
@ override List < CustomerOrder > get items {
if ( _items is EqualUnmodifiableListView ) return _items ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _items );
}
@ override final int page ;
@ override final int totalPages ;
/// Create a copy of CustomerOrderPage
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$CustomerOrderPageCopyWith < _CustomerOrderPage > get copyWith => __$CustomerOrderPageCopyWithImpl < _CustomerOrderPage > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _CustomerOrderPage && const DeepCollectionEquality (). equals ( other . items , _items ) && ( identical ( other . page , page ) || other . page == page ) && ( identical ( other . totalPages , totalPages ) || other . totalPages == totalPages ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , const DeepCollectionEquality (). hash ( _items ), page , totalPages );
}
@ override
String toString () {
return 'CustomerOrderPage(items: $ items , page: $ page , totalPages: $ totalPages )' ;
}
}
/// @nodoc
abstract mixin class _ $CustomerOrderPageCopyWith < $Res > implements $CustomerOrderPageCopyWith < $Res > {
factory _$CustomerOrderPageCopyWith ( _CustomerOrderPage value , $Res Function ( _CustomerOrderPage ) _then ) = __$CustomerOrderPageCopyWithImpl ;
@ override @ useResult
$Res call ({
List < CustomerOrder > items , int page , int totalPages
});
}
/// @nodoc
class __ $CustomerOrderPageCopyWithImpl < $Res >
implements _$CustomerOrderPageCopyWith < $Res > {
__$CustomerOrderPageCopyWithImpl ( this . _self , this . _then );
final _CustomerOrderPage _self ;
final $Res Function ( _CustomerOrderPage ) _then ;
/// Create a copy of CustomerOrderPage
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? items = null , Object ? page = null , Object ? totalPages = null ,}) {
return _then ( _CustomerOrderPage (
items: null == items ? _self . _items : items // ignore: cast_nullable_to_non_nullable
as List < CustomerOrder > , page: null == page ? _self . page : page // ignore: cast_nullable_to_non_nullable
as int , totalPages: null == totalPages ? _self . totalPages : totalPages // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// @nodoc
mixin _$CustomerOrderDetail {
CustomerOrder get order ; String ? get tableNumber ; int get subtotal ; int get discountAmount ; int get taxAmount ; int get refundAmount ; List < CustomerOrderItem > get items ; List < CustomerOrderPayment > get payments ;
/// Create a copy of CustomerOrderDetail
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$CustomerOrderDetailCopyWith < CustomerOrderDetail > get copyWith => _$CustomerOrderDetailCopyWithImpl < CustomerOrderDetail > ( this as CustomerOrderDetail , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as CustomerOrderDetail ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is CustomerOrderDetail && ( identical ( other . order , _this . order ) || other . order == _this . order ) && ( identical ( other . tableNumber , _this . tableNumber ) || other . tableNumber == _this . tableNumber ) && ( identical ( other . subtotal , _this . subtotal ) || other . subtotal == _this . subtotal ) && ( identical ( other . discountAmount , _this . discountAmount ) || other . discountAmount == _this . discountAmount ) && ( identical ( other . taxAmount , _this . taxAmount ) || other . taxAmount == _this . taxAmount ) && ( identical ( other . refundAmount , _this . refundAmount ) || other . refundAmount == _this . refundAmount ) && const DeepCollectionEquality (). equals ( other . items , _this . items ) && const DeepCollectionEquality (). equals ( other . payments , _this . payments ));
}
@ override
int get hashCode {
final _this = this as CustomerOrderDetail ;
return Object . hash ( runtimeType , _this . order , _this . tableNumber , _this . subtotal , _this . discountAmount , _this . taxAmount , _this . refundAmount , const DeepCollectionEquality (). hash ( _this . items ), const DeepCollectionEquality (). hash ( _this . payments ));
}
@ override
String toString () {
final _this = this as CustomerOrderDetail ;
return 'CustomerOrderDetail(order: ${ _this . order } , tableNumber: ${ _this . tableNumber } , subtotal: ${ _this . subtotal } , discountAmount: ${ _this . discountAmount } , taxAmount: ${ _this . taxAmount } , refundAmount: ${ _this . refundAmount } , items: ${ _this . items } , payments: ${ _this . payments } )' ;
}
}
/// @nodoc
abstract mixin class $CustomerOrderDetailCopyWith < $Res > {
factory $CustomerOrderDetailCopyWith ( CustomerOrderDetail value , $Res Function ( CustomerOrderDetail ) _then ) = _$CustomerOrderDetailCopyWithImpl ;
@ useResult
$Res call ({
CustomerOrder order , String ? tableNumber , int subtotal , int discountAmount , int taxAmount , int refundAmount , List < CustomerOrderItem > items , List < CustomerOrderPayment > payments
});
$CustomerOrderCopyWith < $Res > get order ;
}
/// @nodoc
class _ $CustomerOrderDetailCopyWithImpl < $Res >
implements $CustomerOrderDetailCopyWith < $Res > {
_$CustomerOrderDetailCopyWithImpl ( this . _self , this . _then );
final CustomerOrderDetail _self ;
final $Res Function ( CustomerOrderDetail ) _then ;
/// Create a copy of CustomerOrderDetail
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? order = null , Object ? tableNumber = freezed , Object ? subtotal = null , Object ? discountAmount = null , Object ? taxAmount = null , Object ? refundAmount = null , Object ? items = null , Object ? payments = null ,}) {
return _then ( CustomerOrderDetail (
order: null == order ? _self . order : order // ignore: cast_nullable_to_non_nullable
as CustomerOrder , tableNumber: freezed == tableNumber ? _self . tableNumber : tableNumber // ignore: cast_nullable_to_non_nullable
as String ? , subtotal: null == subtotal ? _self . subtotal : subtotal // ignore: cast_nullable_to_non_nullable
as int , discountAmount: null == discountAmount ? _self . discountAmount : discountAmount // ignore: cast_nullable_to_non_nullable
as int , taxAmount: null == taxAmount ? _self . taxAmount : taxAmount // ignore: cast_nullable_to_non_nullable
as int , refundAmount: null == refundAmount ? _self . refundAmount : refundAmount // ignore: cast_nullable_to_non_nullable
as int , items: null == items ? _self . items : items // ignore: cast_nullable_to_non_nullable
as List < CustomerOrderItem > , payments: null == payments ? _self . payments : payments // ignore: cast_nullable_to_non_nullable
as List < CustomerOrderPayment > ,
));
}
/// Create a copy of CustomerOrderDetail
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$CustomerOrderCopyWith < $Res > get order {
return $CustomerOrderCopyWith < $Res > ( _self . order , ( value ) {
return _then ( _self . copyWith ( order: value ));
});
}
}
/// Adds pattern-matching-related methods to [CustomerOrderDetail].
extension CustomerOrderDetailPatterns on CustomerOrderDetail {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _CustomerOrderDetail value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _CustomerOrderDetail () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _CustomerOrderDetail value ) $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrderDetail () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _CustomerOrderDetail value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrderDetail () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( CustomerOrder order , String ? tableNumber , int subtotal , int discountAmount , int taxAmount , int refundAmount , List < CustomerOrderItem > items , List < CustomerOrderPayment > payments ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _CustomerOrderDetail () when $default != null :
return $default ( _that . order , _that . tableNumber , _that . subtotal , _that . discountAmount , _that . taxAmount , _that . refundAmount , _that . items , _that . payments ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( CustomerOrder order , String ? tableNumber , int subtotal , int discountAmount , int taxAmount , int refundAmount , List < CustomerOrderItem > items , List < CustomerOrderPayment > payments ) $default ,) { final _that = this ;
switch ( _that ) {
case _CustomerOrderDetail () :
return $default ( _that . order , _that . tableNumber , _that . subtotal , _that . discountAmount , _that . taxAmount , _that . refundAmount , _that . items , _that . payments ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( CustomerOrder order , String ? tableNumber , int subtotal , int discountAmount , int taxAmount , int refundAmount , List < CustomerOrderItem > items , List < CustomerOrderPayment > payments ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _CustomerOrderDetail () when $default != null :
return $default ( _that . order , _that . tableNumber , _that . subtotal , _that . discountAmount , _that . taxAmount , _that . refundAmount , _that . items , _that . payments ); case _:
return null ;
}
}
}
/// @nodoc
class _CustomerOrderDetail implements CustomerOrderDetail {
const _CustomerOrderDetail ({ required this . order , this . tableNumber , required this . subtotal , required this . discountAmount , required this . taxAmount , required this . refundAmount , required List < CustomerOrderItem > items , required List < CustomerOrderPayment > payments }) : _items = items , _payments = payments ;
@ override final CustomerOrder order ;
@ override final String ? tableNumber ;
@ override final int subtotal ;
@ override final int discountAmount ;
@ override final int taxAmount ;
@ override final int refundAmount ;
final List < CustomerOrderItem > _items ;
@ override List < CustomerOrderItem > get items {
if ( _items is EqualUnmodifiableListView ) return _items ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _items );
}
final List < CustomerOrderPayment > _payments ;
@ override List < CustomerOrderPayment > get payments {
if ( _payments is EqualUnmodifiableListView ) return _payments ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _payments );
}
/// Create a copy of CustomerOrderDetail
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$CustomerOrderDetailCopyWith < _CustomerOrderDetail > get copyWith => __$CustomerOrderDetailCopyWithImpl < _CustomerOrderDetail > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _CustomerOrderDetail && ( identical ( other . order , order ) || other . order == order ) && ( identical ( other . tableNumber , tableNumber ) || other . tableNumber == tableNumber ) && ( identical ( other . subtotal , subtotal ) || other . subtotal == subtotal ) && ( identical ( other . discountAmount , discountAmount ) || other . discountAmount == discountAmount ) && ( identical ( other . taxAmount , taxAmount ) || other . taxAmount == taxAmount ) && ( identical ( other . refundAmount , refundAmount ) || other . refundAmount == refundAmount ) && const DeepCollectionEquality (). equals ( other . items , _items ) && const DeepCollectionEquality (). equals ( other . payments , _payments ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , order , tableNumber , subtotal , discountAmount , taxAmount , refundAmount , const DeepCollectionEquality (). hash ( _items ), const DeepCollectionEquality (). hash ( _payments ));
}
@ override
String toString () {
return 'CustomerOrderDetail(order: $ order , tableNumber: $ tableNumber , subtotal: $ subtotal , discountAmount: $ discountAmount , taxAmount: $ taxAmount , refundAmount: $ refundAmount , items: $ items , payments: $ payments )' ;
}
}
/// @nodoc
abstract mixin class _ $CustomerOrderDetailCopyWith < $Res > implements $CustomerOrderDetailCopyWith < $Res > {
factory _$CustomerOrderDetailCopyWith ( _CustomerOrderDetail value , $Res Function ( _CustomerOrderDetail ) _then ) = __$CustomerOrderDetailCopyWithImpl ;
@ override @ useResult
$Res call ({
CustomerOrder order , String ? tableNumber , int subtotal , int discountAmount , int taxAmount , int refundAmount , List < CustomerOrderItem > items , List < CustomerOrderPayment > payments
});
@ override $CustomerOrderCopyWith < $Res > get order ;
}
/// @nodoc
class __ $CustomerOrderDetailCopyWithImpl < $Res >
implements _$CustomerOrderDetailCopyWith < $Res > {
__$CustomerOrderDetailCopyWithImpl ( this . _self , this . _then );
final _CustomerOrderDetail _self ;
final $Res Function ( _CustomerOrderDetail ) _then ;
/// Create a copy of CustomerOrderDetail
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? order = null , Object ? tableNumber = freezed , Object ? subtotal = null , Object ? discountAmount = null , Object ? taxAmount = null , Object ? refundAmount = null , Object ? items = null , Object ? payments = null ,}) {
return _then ( _CustomerOrderDetail (
order: null == order ? _self . order : order // ignore: cast_nullable_to_non_nullable
as CustomerOrder , tableNumber: freezed == tableNumber ? _self . tableNumber : tableNumber // ignore: cast_nullable_to_non_nullable
as String ? , subtotal: null == subtotal ? _self . subtotal : subtotal // ignore: cast_nullable_to_non_nullable
as int , discountAmount: null == discountAmount ? _self . discountAmount : discountAmount // ignore: cast_nullable_to_non_nullable
as int , taxAmount: null == taxAmount ? _self . taxAmount : taxAmount // ignore: cast_nullable_to_non_nullable
as int , refundAmount: null == refundAmount ? _self . refundAmount : refundAmount // ignore: cast_nullable_to_non_nullable
as int , items: null == items ? _self . _items : items // ignore: cast_nullable_to_non_nullable
as List < CustomerOrderItem > , payments: null == payments ? _self . _payments : payments // ignore: cast_nullable_to_non_nullable
as List < CustomerOrderPayment > ,
));
}
/// Create a copy of CustomerOrderDetail
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$CustomerOrderCopyWith < $Res > get order {
return $CustomerOrderCopyWith < $Res > ( _self . order , ( value ) {
return _then ( _self . copyWith ( order: value ));
});
}
}
/// @nodoc
mixin _$CustomerOrderItem {
String get id ; String get productName ; String ? get variantName ; int get quantity ; /// Hanya untuk item timbangan, mis. 4,2 [unitName].
double ? get weight ; String ? get unitName ; int get unitPrice ; int get totalPrice ; int get refundQuantity ;
/// Create a copy of CustomerOrderItem
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$CustomerOrderItemCopyWith < CustomerOrderItem > get copyWith => _$CustomerOrderItemCopyWithImpl < CustomerOrderItem > ( this as CustomerOrderItem , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as CustomerOrderItem ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is CustomerOrderItem && ( identical ( other . id , _this . id ) || other . id == _this . id ) && ( identical ( other . productName , _this . productName ) || other . productName == _this . productName ) && ( identical ( other . variantName , _this . variantName ) || other . variantName == _this . variantName ) && ( identical ( other . quantity , _this . quantity ) || other . quantity == _this . quantity ) && ( identical ( other . weight , _this . weight ) || other . weight == _this . weight ) && ( identical ( other . unitName , _this . unitName ) || other . unitName == _this . unitName ) && ( identical ( other . unitPrice , _this . unitPrice ) || other . unitPrice == _this . unitPrice ) && ( identical ( other . totalPrice , _this . totalPrice ) || other . totalPrice == _this . totalPrice ) && ( identical ( other . refundQuantity , _this . refundQuantity ) || other . refundQuantity == _this . refundQuantity ));
}
@ override
int get hashCode {
final _this = this as CustomerOrderItem ;
return Object . hash ( runtimeType , _this . id , _this . productName , _this . variantName , _this . quantity , _this . weight , _this . unitName , _this . unitPrice , _this . totalPrice , _this . refundQuantity );
}
@ override
String toString () {
final _this = this as CustomerOrderItem ;
return 'CustomerOrderItem(id: ${ _this . id } , productName: ${ _this . productName } , variantName: ${ _this . variantName } , quantity: ${ _this . quantity } , weight: ${ _this . weight } , unitName: ${ _this . unitName } , unitPrice: ${ _this . unitPrice } , totalPrice: ${ _this . totalPrice } , refundQuantity: ${ _this . refundQuantity } )' ;
}
}
/// @nodoc
abstract mixin class $CustomerOrderItemCopyWith < $Res > {
factory $CustomerOrderItemCopyWith ( CustomerOrderItem value , $Res Function ( CustomerOrderItem ) _then ) = _$CustomerOrderItemCopyWithImpl ;
@ useResult
$Res call ({
String id , String productName , String ? variantName , int quantity , double ? weight , String ? unitName , int unitPrice , int totalPrice , int refundQuantity
});
}
/// @nodoc
class _ $CustomerOrderItemCopyWithImpl < $Res >
implements $CustomerOrderItemCopyWith < $Res > {
_$CustomerOrderItemCopyWithImpl ( this . _self , this . _then );
final CustomerOrderItem _self ;
final $Res Function ( CustomerOrderItem ) _then ;
/// Create a copy of CustomerOrderItem
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? id = null , Object ? productName = null , Object ? variantName = freezed , Object ? quantity = null , Object ? weight = freezed , Object ? unitName = freezed , Object ? unitPrice = null , Object ? totalPrice = null , Object ? refundQuantity = null ,}) {
return _then ( CustomerOrderItem (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , productName: null == productName ? _self . productName : productName // ignore: cast_nullable_to_non_nullable
as String , variantName: freezed == variantName ? _self . variantName : variantName // ignore: cast_nullable_to_non_nullable
as String ? , quantity: null == quantity ? _self . quantity : quantity // ignore: cast_nullable_to_non_nullable
as int , weight: freezed == weight ? _self . weight : weight // ignore: cast_nullable_to_non_nullable
as double ? , unitName: freezed == unitName ? _self . unitName : unitName // ignore: cast_nullable_to_non_nullable
as String ? , unitPrice: null == unitPrice ? _self . unitPrice : unitPrice // ignore: cast_nullable_to_non_nullable
as int , totalPrice: null == totalPrice ? _self . totalPrice : totalPrice // ignore: cast_nullable_to_non_nullable
as int , refundQuantity: null == refundQuantity ? _self . refundQuantity : refundQuantity // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// Adds pattern-matching-related methods to [CustomerOrderItem].
extension CustomerOrderItemPatterns on CustomerOrderItem {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _CustomerOrderItem value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _CustomerOrderItem () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _CustomerOrderItem value ) $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrderItem () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _CustomerOrderItem value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrderItem () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( String id , String productName , String ? variantName , int quantity , double ? weight , String ? unitName , int unitPrice , int totalPrice , int refundQuantity ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _CustomerOrderItem () when $default != null :
return $default ( _that . id , _that . productName , _that . variantName , _that . quantity , _that . weight , _that . unitName , _that . unitPrice , _that . totalPrice , _that . refundQuantity ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( String id , String productName , String ? variantName , int quantity , double ? weight , String ? unitName , int unitPrice , int totalPrice , int refundQuantity ) $default ,) { final _that = this ;
switch ( _that ) {
case _CustomerOrderItem () :
return $default ( _that . id , _that . productName , _that . variantName , _that . quantity , _that . weight , _that . unitName , _that . unitPrice , _that . totalPrice , _that . refundQuantity ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( String id , String productName , String ? variantName , int quantity , double ? weight , String ? unitName , int unitPrice , int totalPrice , int refundQuantity ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _CustomerOrderItem () when $default != null :
return $default ( _that . id , _that . productName , _that . variantName , _that . quantity , _that . weight , _that . unitName , _that . unitPrice , _that . totalPrice , _that . refundQuantity ); case _:
return null ;
}
}
}
/// @nodoc
class _CustomerOrderItem extends CustomerOrderItem {
const _CustomerOrderItem ({ required this . id , required this . productName , this . variantName , required this . quantity , this . weight , this . unitName , required this . unitPrice , required this . totalPrice , required this . refundQuantity }) : super . _ ();
@ override final String id ;
@ override final String productName ;
@ override final String ? variantName ;
@ override final int quantity ;
/// Hanya untuk item timbangan, mis. 4,2 [unitName].
@ override final double ? weight ;
@ override final String ? unitName ;
@ override final int unitPrice ;
@ override final int totalPrice ;
@ override final int refundQuantity ;
/// Create a copy of CustomerOrderItem
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$CustomerOrderItemCopyWith < _CustomerOrderItem > get copyWith => __$CustomerOrderItemCopyWithImpl < _CustomerOrderItem > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _CustomerOrderItem && ( identical ( other . id , id ) || other . id == id ) && ( identical ( other . productName , productName ) || other . productName == productName ) && ( identical ( other . variantName , variantName ) || other . variantName == variantName ) && ( identical ( other . quantity , quantity ) || other . quantity == quantity ) && ( identical ( other . weight , weight ) || other . weight == weight ) && ( identical ( other . unitName , unitName ) || other . unitName == unitName ) && ( identical ( other . unitPrice , unitPrice ) || other . unitPrice == unitPrice ) && ( identical ( other . totalPrice , totalPrice ) || other . totalPrice == totalPrice ) && ( identical ( other . refundQuantity , refundQuantity ) || other . refundQuantity == refundQuantity ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , id , productName , variantName , quantity , weight , unitName , unitPrice , totalPrice , refundQuantity );
}
@ override
String toString () {
return 'CustomerOrderItem(id: $ id , productName: $ productName , variantName: $ variantName , quantity: $ quantity , weight: $ weight , unitName: $ unitName , unitPrice: $ unitPrice , totalPrice: $ totalPrice , refundQuantity: $ refundQuantity )' ;
}
}
/// @nodoc
abstract mixin class _ $CustomerOrderItemCopyWith < $Res > implements $CustomerOrderItemCopyWith < $Res > {
factory _$CustomerOrderItemCopyWith ( _CustomerOrderItem value , $Res Function ( _CustomerOrderItem ) _then ) = __$CustomerOrderItemCopyWithImpl ;
@ override @ useResult
$Res call ({
String id , String productName , String ? variantName , int quantity , double ? weight , String ? unitName , int unitPrice , int totalPrice , int refundQuantity
});
}
/// @nodoc
class __ $CustomerOrderItemCopyWithImpl < $Res >
implements _$CustomerOrderItemCopyWith < $Res > {
__$CustomerOrderItemCopyWithImpl ( this . _self , this . _then );
final _CustomerOrderItem _self ;
final $Res Function ( _CustomerOrderItem ) _then ;
/// Create a copy of CustomerOrderItem
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? id = null , Object ? productName = null , Object ? variantName = freezed , Object ? quantity = null , Object ? weight = freezed , Object ? unitName = freezed , Object ? unitPrice = null , Object ? totalPrice = null , Object ? refundQuantity = null ,}) {
return _then ( _CustomerOrderItem (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , productName: null == productName ? _self . productName : productName // ignore: cast_nullable_to_non_nullable
as String , variantName: freezed == variantName ? _self . variantName : variantName // ignore: cast_nullable_to_non_nullable
as String ? , quantity: null == quantity ? _self . quantity : quantity // ignore: cast_nullable_to_non_nullable
as int , weight: freezed == weight ? _self . weight : weight // ignore: cast_nullable_to_non_nullable
as double ? , unitName: freezed == unitName ? _self . unitName : unitName // ignore: cast_nullable_to_non_nullable
as String ? , unitPrice: null == unitPrice ? _self . unitPrice : unitPrice // ignore: cast_nullable_to_non_nullable
as int , totalPrice: null == totalPrice ? _self . totalPrice : totalPrice // ignore: cast_nullable_to_non_nullable
as int , refundQuantity: null == refundQuantity ? _self . refundQuantity : refundQuantity // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// @nodoc
mixin _$CustomerOrderPayment {
2026-10-10 02:33:16 +07:00
String get id ; String get methodName ; String get methodType ; int get amount ; int get refundAmount ;
2026-10-01 01:43:22 +07:00
/// Create a copy of CustomerOrderPayment
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$CustomerOrderPaymentCopyWith < CustomerOrderPayment > get copyWith => _$CustomerOrderPaymentCopyWithImpl < CustomerOrderPayment > ( this as CustomerOrderPayment , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as CustomerOrderPayment ;
2026-10-10 02:33:16 +07:00
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is CustomerOrderPayment && ( identical ( other . id , _this . id ) || other . id == _this . id ) && ( identical ( other . methodName , _this . methodName ) || other . methodName == _this . methodName ) && ( identical ( other . methodType , _this . methodType ) || other . methodType == _this . methodType ) && ( identical ( other . amount , _this . amount ) || other . amount == _this . amount ) && ( identical ( other . refundAmount , _this . refundAmount ) || other . refundAmount == _this . refundAmount ));
2026-10-01 01:43:22 +07:00
}
@ override
int get hashCode {
final _this = this as CustomerOrderPayment ;
2026-10-10 02:33:16 +07:00
return Object . hash ( runtimeType , _this . id , _this . methodName , _this . methodType , _this . amount , _this . refundAmount );
2026-10-01 01:43:22 +07:00
}
@ override
String toString () {
final _this = this as CustomerOrderPayment ;
2026-10-10 02:33:16 +07:00
return 'CustomerOrderPayment(id: ${ _this . id } , methodName: ${ _this . methodName } , methodType: ${ _this . methodType } , amount: ${ _this . amount } , refundAmount: ${ _this . refundAmount } )' ;
2026-10-01 01:43:22 +07:00
}
}
/// @nodoc
abstract mixin class $CustomerOrderPaymentCopyWith < $Res > {
factory $CustomerOrderPaymentCopyWith ( CustomerOrderPayment value , $Res Function ( CustomerOrderPayment ) _then ) = _$CustomerOrderPaymentCopyWithImpl ;
@ useResult
$Res call ({
2026-10-10 02:33:16 +07:00
String id , String methodName , String methodType , int amount , int refundAmount
2026-10-01 01:43:22 +07:00
});
}
/// @nodoc
class _ $CustomerOrderPaymentCopyWithImpl < $Res >
implements $CustomerOrderPaymentCopyWith < $Res > {
_$CustomerOrderPaymentCopyWithImpl ( this . _self , this . _then );
final CustomerOrderPayment _self ;
final $Res Function ( CustomerOrderPayment ) _then ;
/// Create a copy of CustomerOrderPayment
/// with the given fields replaced by the non-null parameter values.
2026-10-10 02:33:16 +07:00
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? id = null , Object ? methodName = null , Object ? methodType = null , Object ? amount = null , Object ? refundAmount = null ,}) {
2026-10-01 01:43:22 +07:00
return _then ( CustomerOrderPayment (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , methodName: null == methodName ? _self . methodName : methodName // ignore: cast_nullable_to_non_nullable
as String , methodType: null == methodType ? _self . methodType : methodType // ignore: cast_nullable_to_non_nullable
as String , amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , refundAmount: null == refundAmount ? _self . refundAmount : refundAmount // ignore: cast_nullable_to_non_nullable
2026-10-10 02:33:16 +07:00
as int ,
2026-10-01 01:43:22 +07:00
));
}
}
/// Adds pattern-matching-related methods to [CustomerOrderPayment].
extension CustomerOrderPaymentPatterns on CustomerOrderPayment {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _CustomerOrderPayment value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _CustomerOrderPayment () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _CustomerOrderPayment value ) $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrderPayment () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _CustomerOrderPayment value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _CustomerOrderPayment () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
2026-10-10 02:33:16 +07:00
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( String id , String methodName , String methodType , int amount , int refundAmount ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
2026-10-01 01:43:22 +07:00
switch ( _that ) {
case _CustomerOrderPayment () when $default != null :
2026-10-10 02:33:16 +07:00
return $default ( _that . id , _that . methodName , _that . methodType , _that . amount , _that . refundAmount ); case _:
2026-10-01 01:43:22 +07:00
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
2026-10-10 02:33:16 +07:00
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( String id , String methodName , String methodType , int amount , int refundAmount ) $default ,) { final _that = this ;
2026-10-01 01:43:22 +07:00
switch ( _that ) {
case _CustomerOrderPayment () :
2026-10-10 02:33:16 +07:00
return $default ( _that . id , _that . methodName , _that . methodType , _that . amount , _that . refundAmount ); case _:
2026-10-01 01:43:22 +07:00
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
2026-10-10 02:33:16 +07:00
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( String id , String methodName , String methodType , int amount , int refundAmount ) ? $default ,) { final _that = this ;
2026-10-01 01:43:22 +07:00
switch ( _that ) {
case _CustomerOrderPayment () when $default != null :
2026-10-10 02:33:16 +07:00
return $default ( _that . id , _that . methodName , _that . methodType , _that . amount , _that . refundAmount ); case _:
2026-10-01 01:43:22 +07:00
return null ;
}
}
}
/// @nodoc
2026-10-10 02:33:16 +07:00
class _CustomerOrderPayment implements CustomerOrderPayment {
const _CustomerOrderPayment ({ required this . id , required this . methodName , required this . methodType , required this . amount , required this . refundAmount });
2026-10-01 01:43:22 +07:00
@ override final String id ;
@ override final String methodName ;
@ override final String methodType ;
@ override final int amount ;
@ override final int refundAmount ;
/// Create a copy of CustomerOrderPayment
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$CustomerOrderPaymentCopyWith < _CustomerOrderPayment > get copyWith => __$CustomerOrderPaymentCopyWithImpl < _CustomerOrderPayment > ( this , _$identity );
@ override
bool operator == ( Object other ) {
2026-10-10 02:33:16 +07:00
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _CustomerOrderPayment && ( identical ( other . id , id ) || other . id == id ) && ( identical ( other . methodName , methodName ) || other . methodName == methodName ) && ( identical ( other . methodType , methodType ) || other . methodType == methodType ) && ( identical ( other . amount , amount ) || other . amount == amount ) && ( identical ( other . refundAmount , refundAmount ) || other . refundAmount == refundAmount ));
2026-10-01 01:43:22 +07:00
}
@ override
int get hashCode {
2026-10-10 02:33:16 +07:00
return Object . hash ( runtimeType , id , methodName , methodType , amount , refundAmount );
2026-10-01 01:43:22 +07:00
}
@ override
String toString () {
2026-10-10 02:33:16 +07:00
return 'CustomerOrderPayment(id: $ id , methodName: $ methodName , methodType: $ methodType , amount: $ amount , refundAmount: $ refundAmount )' ;
2026-10-01 01:43:22 +07:00
}
}
/// @nodoc
abstract mixin class _ $CustomerOrderPaymentCopyWith < $Res > implements $CustomerOrderPaymentCopyWith < $Res > {
factory _$CustomerOrderPaymentCopyWith ( _CustomerOrderPayment value , $Res Function ( _CustomerOrderPayment ) _then ) = __$CustomerOrderPaymentCopyWithImpl ;
@ override @ useResult
$Res call ({
2026-10-10 02:33:16 +07:00
String id , String methodName , String methodType , int amount , int refundAmount
2026-10-01 01:43:22 +07:00
});
}
/// @nodoc
class __ $CustomerOrderPaymentCopyWithImpl < $Res >
implements _$CustomerOrderPaymentCopyWith < $Res > {
__$CustomerOrderPaymentCopyWithImpl ( this . _self , this . _then );
final _CustomerOrderPayment _self ;
final $Res Function ( _CustomerOrderPayment ) _then ;
/// Create a copy of CustomerOrderPayment
/// with the given fields replaced by the non-null parameter values.
2026-10-10 02:33:16 +07:00
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? id = null , Object ? methodName = null , Object ? methodType = null , Object ? amount = null , Object ? refundAmount = null ,}) {
2026-10-01 01:43:22 +07:00
return _then ( _CustomerOrderPayment (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , methodName: null == methodName ? _self . methodName : methodName // ignore: cast_nullable_to_non_nullable
as String , methodType: null == methodType ? _self . methodType : methodType // ignore: cast_nullable_to_non_nullable
as String , amount: null == amount ? _self . amount : amount // ignore: cast_nullable_to_non_nullable
as int , refundAmount: null == refundAmount ? _self . refundAmount : refundAmount // ignore: cast_nullable_to_non_nullable
2026-10-10 02:33:16 +07:00
as int ,
));
}
}
/// @nodoc
mixin _$Voucher {
String get id ; String get name ; String ? get description ; String ? get imageUrl ; VoucherType get type ; /// Nilai voucher dalam rupiah.
int get faceValue ; /// EnakPoint yang dipotong saat ditukar.
int get pointCost ; /// Batas tukar per customer; `null` berarti tanpa batas.
int ? get maxPerCustomer ; DateTime ? get validUntil ; /// Sisa stok; `null` berarti stok tidak dihitung.
int ? get available ;
/// Create a copy of Voucher
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$VoucherCopyWith < Voucher > get copyWith => _$VoucherCopyWithImpl < Voucher > ( this as Voucher , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as Voucher ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is Voucher && ( identical ( other . id , _this . id ) || other . id == _this . id ) && ( identical ( other . name , _this . name ) || other . name == _this . name ) && ( identical ( other . description , _this . description ) || other . description == _this . description ) && ( identical ( other . imageUrl , _this . imageUrl ) || other . imageUrl == _this . imageUrl ) && ( identical ( other . type , _this . type ) || other . type == _this . type ) && ( identical ( other . faceValue , _this . faceValue ) || other . faceValue == _this . faceValue ) && ( identical ( other . pointCost , _this . pointCost ) || other . pointCost == _this . pointCost ) && ( identical ( other . maxPerCustomer , _this . maxPerCustomer ) || other . maxPerCustomer == _this . maxPerCustomer ) && ( identical ( other . validUntil , _this . validUntil ) || other . validUntil == _this . validUntil ) && ( identical ( other . available , _this . available ) || other . available == _this . available ));
}
@ override
int get hashCode {
final _this = this as Voucher ;
return Object . hash ( runtimeType , _this . id , _this . name , _this . description , _this . imageUrl , _this . type , _this . faceValue , _this . pointCost , _this . maxPerCustomer , _this . validUntil , _this . available );
}
@ override
String toString () {
final _this = this as Voucher ;
return 'Voucher(id: ${ _this . id } , name: ${ _this . name } , description: ${ _this . description } , imageUrl: ${ _this . imageUrl } , type: ${ _this . type } , faceValue: ${ _this . faceValue } , pointCost: ${ _this . pointCost } , maxPerCustomer: ${ _this . maxPerCustomer } , validUntil: ${ _this . validUntil } , available: ${ _this . available } )' ;
}
}
/// @nodoc
abstract mixin class $VoucherCopyWith < $Res > {
factory $VoucherCopyWith ( Voucher value , $Res Function ( Voucher ) _then ) = _$VoucherCopyWithImpl ;
@ useResult
$Res call ({
String id , String name , String ? description , String ? imageUrl , VoucherType type , int faceValue , int pointCost , int ? maxPerCustomer , DateTime ? validUntil , int ? available
});
}
/// @nodoc
class _ $VoucherCopyWithImpl < $Res >
implements $VoucherCopyWith < $Res > {
_$VoucherCopyWithImpl ( this . _self , this . _then );
final Voucher _self ;
final $Res Function ( Voucher ) _then ;
/// Create a copy of Voucher
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? id = null , Object ? name = null , Object ? description = freezed , Object ? imageUrl = freezed , Object ? type = null , Object ? faceValue = null , Object ? pointCost = null , Object ? maxPerCustomer = freezed , Object ? validUntil = freezed , Object ? available = freezed ,}) {
return _then ( Voucher (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , name: null == name ? _self . name : name // ignore: cast_nullable_to_non_nullable
as String , description: freezed == description ? _self . description : description // ignore: cast_nullable_to_non_nullable
as String ? , imageUrl: freezed == imageUrl ? _self . imageUrl : imageUrl // ignore: cast_nullable_to_non_nullable
as String ? , type: null == type ? _self . type : type // ignore: cast_nullable_to_non_nullable
as VoucherType , faceValue: null == faceValue ? _self . faceValue : faceValue // ignore: cast_nullable_to_non_nullable
as int , pointCost: null == pointCost ? _self . pointCost : pointCost // ignore: cast_nullable_to_non_nullable
as int , maxPerCustomer: freezed == maxPerCustomer ? _self . maxPerCustomer : maxPerCustomer // ignore: cast_nullable_to_non_nullable
as int ? , validUntil: freezed == validUntil ? _self . validUntil : validUntil // ignore: cast_nullable_to_non_nullable
as DateTime ? , available: freezed == available ? _self . available : available // ignore: cast_nullable_to_non_nullable
as int ? ,
));
}
}
/// Adds pattern-matching-related methods to [Voucher].
extension VoucherPatterns on Voucher {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _Voucher value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _Voucher () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _Voucher value ) $default ,){
final _that = this ;
switch ( _that ) {
case _Voucher () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _Voucher value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _Voucher () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( String id , String name , String ? description , String ? imageUrl , VoucherType type , int faceValue , int pointCost , int ? maxPerCustomer , DateTime ? validUntil , int ? available ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _Voucher () when $default != null :
return $default ( _that . id , _that . name , _that . description , _that . imageUrl , _that . type , _that . faceValue , _that . pointCost , _that . maxPerCustomer , _that . validUntil , _that . available ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( String id , String name , String ? description , String ? imageUrl , VoucherType type , int faceValue , int pointCost , int ? maxPerCustomer , DateTime ? validUntil , int ? available ) $default ,) { final _that = this ;
switch ( _that ) {
case _Voucher () :
return $default ( _that . id , _that . name , _that . description , _that . imageUrl , _that . type , _that . faceValue , _that . pointCost , _that . maxPerCustomer , _that . validUntil , _that . available ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( String id , String name , String ? description , String ? imageUrl , VoucherType type , int faceValue , int pointCost , int ? maxPerCustomer , DateTime ? validUntil , int ? available ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _Voucher () when $default != null :
return $default ( _that . id , _that . name , _that . description , _that . imageUrl , _that . type , _that . faceValue , _that . pointCost , _that . maxPerCustomer , _that . validUntil , _that . available ); case _:
return null ;
}
}
}
/// @nodoc
class _Voucher extends Voucher {
const _Voucher ({ required this . id , required this . name , this . description , this . imageUrl , required this . type , required this . faceValue , required this . pointCost , this . maxPerCustomer , this . validUntil , this . available }) : super . _ ();
@ override final String id ;
@ override final String name ;
@ override final String ? description ;
@ override final String ? imageUrl ;
@ override final VoucherType type ;
/// Nilai voucher dalam rupiah.
@ override final int faceValue ;
/// EnakPoint yang dipotong saat ditukar.
@ override final int pointCost ;
/// Batas tukar per customer; `null` berarti tanpa batas.
@ override final int ? maxPerCustomer ;
@ override final DateTime ? validUntil ;
/// Sisa stok; `null` berarti stok tidak dihitung.
@ override final int ? available ;
/// Create a copy of Voucher
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$VoucherCopyWith < _Voucher > get copyWith => __$VoucherCopyWithImpl < _Voucher > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _Voucher && ( identical ( other . id , id ) || other . id == id ) && ( identical ( other . name , name ) || other . name == name ) && ( identical ( other . description , description ) || other . description == description ) && ( identical ( other . imageUrl , imageUrl ) || other . imageUrl == imageUrl ) && ( identical ( other . type , type ) || other . type == type ) && ( identical ( other . faceValue , faceValue ) || other . faceValue == faceValue ) && ( identical ( other . pointCost , pointCost ) || other . pointCost == pointCost ) && ( identical ( other . maxPerCustomer , maxPerCustomer ) || other . maxPerCustomer == maxPerCustomer ) && ( identical ( other . validUntil , validUntil ) || other . validUntil == validUntil ) && ( identical ( other . available , available ) || other . available == available ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , id , name , description , imageUrl , type , faceValue , pointCost , maxPerCustomer , validUntil , available );
}
@ override
String toString () {
return 'Voucher(id: $ id , name: $ name , description: $ description , imageUrl: $ imageUrl , type: $ type , faceValue: $ faceValue , pointCost: $ pointCost , maxPerCustomer: $ maxPerCustomer , validUntil: $ validUntil , available: $ available )' ;
}
}
/// @nodoc
abstract mixin class _ $VoucherCopyWith < $Res > implements $VoucherCopyWith < $Res > {
factory _$VoucherCopyWith ( _Voucher value , $Res Function ( _Voucher ) _then ) = __$VoucherCopyWithImpl ;
@ override @ useResult
$Res call ({
String id , String name , String ? description , String ? imageUrl , VoucherType type , int faceValue , int pointCost , int ? maxPerCustomer , DateTime ? validUntil , int ? available
});
}
/// @nodoc
class __ $VoucherCopyWithImpl < $Res >
implements _$VoucherCopyWith < $Res > {
__$VoucherCopyWithImpl ( this . _self , this . _then );
final _Voucher _self ;
final $Res Function ( _Voucher ) _then ;
/// Create a copy of Voucher
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? id = null , Object ? name = null , Object ? description = freezed , Object ? imageUrl = freezed , Object ? type = null , Object ? faceValue = null , Object ? pointCost = null , Object ? maxPerCustomer = freezed , Object ? validUntil = freezed , Object ? available = freezed ,}) {
return _then ( _Voucher (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , name: null == name ? _self . name : name // ignore: cast_nullable_to_non_nullable
as String , description: freezed == description ? _self . description : description // ignore: cast_nullable_to_non_nullable
as String ? , imageUrl: freezed == imageUrl ? _self . imageUrl : imageUrl // ignore: cast_nullable_to_non_nullable
as String ? , type: null == type ? _self . type : type // ignore: cast_nullable_to_non_nullable
as VoucherType , faceValue: null == faceValue ? _self . faceValue : faceValue // ignore: cast_nullable_to_non_nullable
as int , pointCost: null == pointCost ? _self . pointCost : pointCost // ignore: cast_nullable_to_non_nullable
as int , maxPerCustomer: freezed == maxPerCustomer ? _self . maxPerCustomer : maxPerCustomer // ignore: cast_nullable_to_non_nullable
as int ? , validUntil: freezed == validUntil ? _self . validUntil : validUntil // ignore: cast_nullable_to_non_nullable
as DateTime ? , available: freezed == available ? _self . available : available // ignore: cast_nullable_to_non_nullable
2026-10-01 01:43:22 +07:00
as int ? ,
));
}
}
2026-10-10 02:33:16 +07:00
/// @nodoc
mixin _$VoucherRedemption {
String get id ; String get voucherId ; String get voucherName ; String ? get voucherImageUrl ; VoucherType get voucherType ; VoucherRedemptionStatus get status ; int get faceValue ; int get pointCost ; /// `null` bila voucher tidak memakai kode; customer menunjukkan layar
/// voucher ke kasir.
String ? get code ; DateTime ? get codeExpiresAt ; DateTime ? get completedAt ; DateTime ? get createdAt ;
/// Create a copy of VoucherRedemption
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$VoucherRedemptionCopyWith < VoucherRedemption > get copyWith => _$VoucherRedemptionCopyWithImpl < VoucherRedemption > ( this as VoucherRedemption , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as VoucherRedemption ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is VoucherRedemption && ( identical ( other . id , _this . id ) || other . id == _this . id ) && ( identical ( other . voucherId , _this . voucherId ) || other . voucherId == _this . voucherId ) && ( identical ( other . voucherName , _this . voucherName ) || other . voucherName == _this . voucherName ) && ( identical ( other . voucherImageUrl , _this . voucherImageUrl ) || other . voucherImageUrl == _this . voucherImageUrl ) && ( identical ( other . voucherType , _this . voucherType ) || other . voucherType == _this . voucherType ) && ( identical ( other . status , _this . status ) || other . status == _this . status ) && ( identical ( other . faceValue , _this . faceValue ) || other . faceValue == _this . faceValue ) && ( identical ( other . pointCost , _this . pointCost ) || other . pointCost == _this . pointCost ) && ( identical ( other . code , _this . code ) || other . code == _this . code ) && ( identical ( other . codeExpiresAt , _this . codeExpiresAt ) || other . codeExpiresAt == _this . codeExpiresAt ) && ( identical ( other . completedAt , _this . completedAt ) || other . completedAt == _this . completedAt ) && ( identical ( other . createdAt , _this . createdAt ) || other . createdAt == _this . createdAt ));
}
@ override
int get hashCode {
final _this = this as VoucherRedemption ;
return Object . hash ( runtimeType , _this . id , _this . voucherId , _this . voucherName , _this . voucherImageUrl , _this . voucherType , _this . status , _this . faceValue , _this . pointCost , _this . code , _this . codeExpiresAt , _this . completedAt , _this . createdAt );
}
@ override
String toString () {
final _this = this as VoucherRedemption ;
return 'VoucherRedemption(id: ${ _this . id } , voucherId: ${ _this . voucherId } , voucherName: ${ _this . voucherName } , voucherImageUrl: ${ _this . voucherImageUrl } , voucherType: ${ _this . voucherType } , status: ${ _this . status } , faceValue: ${ _this . faceValue } , pointCost: ${ _this . pointCost } , code: ${ _this . code } , codeExpiresAt: ${ _this . codeExpiresAt } , completedAt: ${ _this . completedAt } , createdAt: ${ _this . createdAt } )' ;
}
}
/// @nodoc
abstract mixin class $VoucherRedemptionCopyWith < $Res > {
factory $VoucherRedemptionCopyWith ( VoucherRedemption value , $Res Function ( VoucherRedemption ) _then ) = _$VoucherRedemptionCopyWithImpl ;
@ useResult
$Res call ({
String id , String voucherId , String voucherName , String ? voucherImageUrl , VoucherType voucherType , VoucherRedemptionStatus status , int faceValue , int pointCost , String ? code , DateTime ? codeExpiresAt , DateTime ? completedAt , DateTime ? createdAt
});
}
/// @nodoc
class _ $VoucherRedemptionCopyWithImpl < $Res >
implements $VoucherRedemptionCopyWith < $Res > {
_$VoucherRedemptionCopyWithImpl ( this . _self , this . _then );
final VoucherRedemption _self ;
final $Res Function ( VoucherRedemption ) _then ;
/// Create a copy of VoucherRedemption
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? id = null , Object ? voucherId = null , Object ? voucherName = null , Object ? voucherImageUrl = freezed , Object ? voucherType = null , Object ? status = null , Object ? faceValue = null , Object ? pointCost = null , Object ? code = freezed , Object ? codeExpiresAt = freezed , Object ? completedAt = freezed , Object ? createdAt = freezed ,}) {
return _then ( VoucherRedemption (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , voucherId: null == voucherId ? _self . voucherId : voucherId // ignore: cast_nullable_to_non_nullable
as String , voucherName: null == voucherName ? _self . voucherName : voucherName // ignore: cast_nullable_to_non_nullable
as String , voucherImageUrl: freezed == voucherImageUrl ? _self . voucherImageUrl : voucherImageUrl // ignore: cast_nullable_to_non_nullable
as String ? , voucherType: null == voucherType ? _self . voucherType : voucherType // ignore: cast_nullable_to_non_nullable
as VoucherType , status: null == status ? _self . status : status // ignore: cast_nullable_to_non_nullable
as VoucherRedemptionStatus , faceValue: null == faceValue ? _self . faceValue : faceValue // ignore: cast_nullable_to_non_nullable
as int , pointCost: null == pointCost ? _self . pointCost : pointCost // ignore: cast_nullable_to_non_nullable
as int , code: freezed == code ? _self . code : code // ignore: cast_nullable_to_non_nullable
as String ? , codeExpiresAt: freezed == codeExpiresAt ? _self . codeExpiresAt : codeExpiresAt // ignore: cast_nullable_to_non_nullable
as DateTime ? , completedAt: freezed == completedAt ? _self . completedAt : completedAt // ignore: cast_nullable_to_non_nullable
as DateTime ? , createdAt: freezed == createdAt ? _self . createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// Adds pattern-matching-related methods to [VoucherRedemption].
extension VoucherRedemptionPatterns on VoucherRedemption {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _VoucherRedemption value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _VoucherRedemption () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _VoucherRedemption value ) $default ,){
final _that = this ;
switch ( _that ) {
case _VoucherRedemption () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _VoucherRedemption value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _VoucherRedemption () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( String id , String voucherId , String voucherName , String ? voucherImageUrl , VoucherType voucherType , VoucherRedemptionStatus status , int faceValue , int pointCost , String ? code , DateTime ? codeExpiresAt , DateTime ? completedAt , DateTime ? createdAt ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _VoucherRedemption () when $default != null :
return $default ( _that . id , _that . voucherId , _that . voucherName , _that . voucherImageUrl , _that . voucherType , _that . status , _that . faceValue , _that . pointCost , _that . code , _that . codeExpiresAt , _that . completedAt , _that . createdAt ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( String id , String voucherId , String voucherName , String ? voucherImageUrl , VoucherType voucherType , VoucherRedemptionStatus status , int faceValue , int pointCost , String ? code , DateTime ? codeExpiresAt , DateTime ? completedAt , DateTime ? createdAt ) $default ,) { final _that = this ;
switch ( _that ) {
case _VoucherRedemption () :
return $default ( _that . id , _that . voucherId , _that . voucherName , _that . voucherImageUrl , _that . voucherType , _that . status , _that . faceValue , _that . pointCost , _that . code , _that . codeExpiresAt , _that . completedAt , _that . createdAt ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( String id , String voucherId , String voucherName , String ? voucherImageUrl , VoucherType voucherType , VoucherRedemptionStatus status , int faceValue , int pointCost , String ? code , DateTime ? codeExpiresAt , DateTime ? completedAt , DateTime ? createdAt ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _VoucherRedemption () when $default != null :
return $default ( _that . id , _that . voucherId , _that . voucherName , _that . voucherImageUrl , _that . voucherType , _that . status , _that . faceValue , _that . pointCost , _that . code , _that . codeExpiresAt , _that . completedAt , _that . createdAt ); case _:
return null ;
}
}
}
/// @nodoc
class _VoucherRedemption implements VoucherRedemption {
const _VoucherRedemption ({ required this . id , required this . voucherId , required this . voucherName , this . voucherImageUrl , required this . voucherType , required this . status , required this . faceValue , required this . pointCost , this . code , this . codeExpiresAt , this . completedAt , this . createdAt });
@ override final String id ;
@ override final String voucherId ;
@ override final String voucherName ;
@ override final String ? voucherImageUrl ;
@ override final VoucherType voucherType ;
@ override final VoucherRedemptionStatus status ;
@ override final int faceValue ;
@ override final int pointCost ;
/// `null` bila voucher tidak memakai kode; customer menunjukkan layar
/// voucher ke kasir.
@ override final String ? code ;
@ override final DateTime ? codeExpiresAt ;
@ override final DateTime ? completedAt ;
@ override final DateTime ? createdAt ;
/// Create a copy of VoucherRedemption
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$VoucherRedemptionCopyWith < _VoucherRedemption > get copyWith => __$VoucherRedemptionCopyWithImpl < _VoucherRedemption > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _VoucherRedemption && ( identical ( other . id , id ) || other . id == id ) && ( identical ( other . voucherId , voucherId ) || other . voucherId == voucherId ) && ( identical ( other . voucherName , voucherName ) || other . voucherName == voucherName ) && ( identical ( other . voucherImageUrl , voucherImageUrl ) || other . voucherImageUrl == voucherImageUrl ) && ( identical ( other . voucherType , voucherType ) || other . voucherType == voucherType ) && ( identical ( other . status , status ) || other . status == status ) && ( identical ( other . faceValue , faceValue ) || other . faceValue == faceValue ) && ( identical ( other . pointCost , pointCost ) || other . pointCost == pointCost ) && ( identical ( other . code , code ) || other . code == code ) && ( identical ( other . codeExpiresAt , codeExpiresAt ) || other . codeExpiresAt == codeExpiresAt ) && ( identical ( other . completedAt , completedAt ) || other . completedAt == completedAt ) && ( identical ( other . createdAt , createdAt ) || other . createdAt == createdAt ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , id , voucherId , voucherName , voucherImageUrl , voucherType , status , faceValue , pointCost , code , codeExpiresAt , completedAt , createdAt );
}
@ override
String toString () {
return 'VoucherRedemption(id: $ id , voucherId: $ voucherId , voucherName: $ voucherName , voucherImageUrl: $ voucherImageUrl , voucherType: $ voucherType , status: $ status , faceValue: $ faceValue , pointCost: $ pointCost , code: $ code , codeExpiresAt: $ codeExpiresAt , completedAt: $ completedAt , createdAt: $ createdAt )' ;
}
}
/// @nodoc
abstract mixin class _ $VoucherRedemptionCopyWith < $Res > implements $VoucherRedemptionCopyWith < $Res > {
factory _$VoucherRedemptionCopyWith ( _VoucherRedemption value , $Res Function ( _VoucherRedemption ) _then ) = __$VoucherRedemptionCopyWithImpl ;
@ override @ useResult
$Res call ({
String id , String voucherId , String voucherName , String ? voucherImageUrl , VoucherType voucherType , VoucherRedemptionStatus status , int faceValue , int pointCost , String ? code , DateTime ? codeExpiresAt , DateTime ? completedAt , DateTime ? createdAt
});
}
/// @nodoc
class __ $VoucherRedemptionCopyWithImpl < $Res >
implements _$VoucherRedemptionCopyWith < $Res > {
__$VoucherRedemptionCopyWithImpl ( this . _self , this . _then );
final _VoucherRedemption _self ;
final $Res Function ( _VoucherRedemption ) _then ;
/// Create a copy of VoucherRedemption
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? id = null , Object ? voucherId = null , Object ? voucherName = null , Object ? voucherImageUrl = freezed , Object ? voucherType = null , Object ? status = null , Object ? faceValue = null , Object ? pointCost = null , Object ? code = freezed , Object ? codeExpiresAt = freezed , Object ? completedAt = freezed , Object ? createdAt = freezed ,}) {
return _then ( _VoucherRedemption (
id: null == id ? _self . id : id // ignore: cast_nullable_to_non_nullable
as String , voucherId: null == voucherId ? _self . voucherId : voucherId // ignore: cast_nullable_to_non_nullable
as String , voucherName: null == voucherName ? _self . voucherName : voucherName // ignore: cast_nullable_to_non_nullable
as String , voucherImageUrl: freezed == voucherImageUrl ? _self . voucherImageUrl : voucherImageUrl // ignore: cast_nullable_to_non_nullable
as String ? , voucherType: null == voucherType ? _self . voucherType : voucherType // ignore: cast_nullable_to_non_nullable
as VoucherType , status: null == status ? _self . status : status // ignore: cast_nullable_to_non_nullable
as VoucherRedemptionStatus , faceValue: null == faceValue ? _self . faceValue : faceValue // ignore: cast_nullable_to_non_nullable
as int , pointCost: null == pointCost ? _self . pointCost : pointCost // ignore: cast_nullable_to_non_nullable
as int , code: freezed == code ? _self . code : code // ignore: cast_nullable_to_non_nullable
as String ? , codeExpiresAt: freezed == codeExpiresAt ? _self . codeExpiresAt : codeExpiresAt // ignore: cast_nullable_to_non_nullable
as DateTime ? , completedAt: freezed == completedAt ? _self . completedAt : completedAt // ignore: cast_nullable_to_non_nullable
as DateTime ? , createdAt: freezed == createdAt ? _self . createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// @nodoc
mixin _$VoucherRedemptionPage {
List < VoucherRedemption > get items ; int get page ; int get totalPages ;
/// Create a copy of VoucherRedemptionPage
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$VoucherRedemptionPageCopyWith < VoucherRedemptionPage > get copyWith => _$VoucherRedemptionPageCopyWithImpl < VoucherRedemptionPage > ( this as VoucherRedemptionPage , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as VoucherRedemptionPage ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is VoucherRedemptionPage && const DeepCollectionEquality (). equals ( other . items , _this . items ) && ( identical ( other . page , _this . page ) || other . page == _this . page ) && ( identical ( other . totalPages , _this . totalPages ) || other . totalPages == _this . totalPages ));
}
@ override
int get hashCode {
final _this = this as VoucherRedemptionPage ;
return Object . hash ( runtimeType , const DeepCollectionEquality (). hash ( _this . items ), _this . page , _this . totalPages );
}
@ override
String toString () {
final _this = this as VoucherRedemptionPage ;
return 'VoucherRedemptionPage(items: ${ _this . items } , page: ${ _this . page } , totalPages: ${ _this . totalPages } )' ;
}
}
/// @nodoc
abstract mixin class $VoucherRedemptionPageCopyWith < $Res > {
factory $VoucherRedemptionPageCopyWith ( VoucherRedemptionPage value , $Res Function ( VoucherRedemptionPage ) _then ) = _$VoucherRedemptionPageCopyWithImpl ;
@ useResult
$Res call ({
List < VoucherRedemption > items , int page , int totalPages
});
}
/// @nodoc
class _ $VoucherRedemptionPageCopyWithImpl < $Res >
implements $VoucherRedemptionPageCopyWith < $Res > {
_$VoucherRedemptionPageCopyWithImpl ( this . _self , this . _then );
final VoucherRedemptionPage _self ;
final $Res Function ( VoucherRedemptionPage ) _then ;
/// Create a copy of VoucherRedemptionPage
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? items = null , Object ? page = null , Object ? totalPages = null ,}) {
return _then ( VoucherRedemptionPage (
items: null == items ? _self . items : items // ignore: cast_nullable_to_non_nullable
as List < VoucherRedemption > , page: null == page ? _self . page : page // ignore: cast_nullable_to_non_nullable
as int , totalPages: null == totalPages ? _self . totalPages : totalPages // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// Adds pattern-matching-related methods to [VoucherRedemptionPage].
extension VoucherRedemptionPagePatterns on VoucherRedemptionPage {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _VoucherRedemptionPage value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _VoucherRedemptionPage () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _VoucherRedemptionPage value ) $default ,){
final _that = this ;
switch ( _that ) {
case _VoucherRedemptionPage () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _VoucherRedemptionPage value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _VoucherRedemptionPage () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( List < VoucherRedemption > items , int page , int totalPages ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _VoucherRedemptionPage () when $default != null :
return $default ( _that . items , _that . page , _that . totalPages ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( List < VoucherRedemption > items , int page , int totalPages ) $default ,) { final _that = this ;
switch ( _that ) {
case _VoucherRedemptionPage () :
return $default ( _that . items , _that . page , _that . totalPages ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( List < VoucherRedemption > items , int page , int totalPages ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _VoucherRedemptionPage () when $default != null :
return $default ( _that . items , _that . page , _that . totalPages ); case _:
return null ;
}
}
}
/// @nodoc
class _VoucherRedemptionPage implements VoucherRedemptionPage {
const _VoucherRedemptionPage ({ required List < VoucherRedemption > items , required this . page , required this . totalPages }) : _items = items ;
final List < VoucherRedemption > _items ;
@ override List < VoucherRedemption > get items {
if ( _items is EqualUnmodifiableListView ) return _items ;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView ( _items );
}
@ override final int page ;
@ override final int totalPages ;
/// Create a copy of VoucherRedemptionPage
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$VoucherRedemptionPageCopyWith < _VoucherRedemptionPage > get copyWith => __$VoucherRedemptionPageCopyWithImpl < _VoucherRedemptionPage > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _VoucherRedemptionPage && const DeepCollectionEquality (). equals ( other . items , _items ) && ( identical ( other . page , page ) || other . page == page ) && ( identical ( other . totalPages , totalPages ) || other . totalPages == totalPages ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , const DeepCollectionEquality (). hash ( _items ), page , totalPages );
}
@ override
String toString () {
return 'VoucherRedemptionPage(items: $ items , page: $ page , totalPages: $ totalPages )' ;
}
}
/// @nodoc
abstract mixin class _ $VoucherRedemptionPageCopyWith < $Res > implements $VoucherRedemptionPageCopyWith < $Res > {
factory _$VoucherRedemptionPageCopyWith ( _VoucherRedemptionPage value , $Res Function ( _VoucherRedemptionPage ) _then ) = __$VoucherRedemptionPageCopyWithImpl ;
@ override @ useResult
$Res call ({
List < VoucherRedemption > items , int page , int totalPages
});
}
/// @nodoc
class __ $VoucherRedemptionPageCopyWithImpl < $Res >
implements _$VoucherRedemptionPageCopyWith < $Res > {
__$VoucherRedemptionPageCopyWithImpl ( this . _self , this . _then );
final _VoucherRedemptionPage _self ;
final $Res Function ( _VoucherRedemptionPage ) _then ;
/// Create a copy of VoucherRedemptionPage
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? items = null , Object ? page = null , Object ? totalPages = null ,}) {
return _then ( _VoucherRedemptionPage (
items: null == items ? _self . _items : items // ignore: cast_nullable_to_non_nullable
as List < VoucherRedemption > , page: null == page ? _self . page : page // ignore: cast_nullable_to_non_nullable
as int , totalPages: null == totalPages ? _self . totalPages : totalPages // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// @nodoc
mixin _$VoucherRedeemResult {
VoucherRedemption get redemption ; /// Saldo EnakPoint setelah ditukar.
int get pointBalance ; bool get replayed ;
/// Create a copy of VoucherRedeemResult
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
$VoucherRedeemResultCopyWith < VoucherRedeemResult > get copyWith => _$VoucherRedeemResultCopyWithImpl < VoucherRedeemResult > ( this as VoucherRedeemResult , _$identity );
@ override
bool operator == ( Object other ) {
final _this = this as VoucherRedeemResult ;
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is VoucherRedeemResult && ( identical ( other . redemption , _this . redemption ) || other . redemption == _this . redemption ) && ( identical ( other . pointBalance , _this . pointBalance ) || other . pointBalance == _this . pointBalance ) && ( identical ( other . replayed , _this . replayed ) || other . replayed == _this . replayed ));
}
@ override
int get hashCode {
final _this = this as VoucherRedeemResult ;
return Object . hash ( runtimeType , _this . redemption , _this . pointBalance , _this . replayed );
}
@ override
String toString () {
final _this = this as VoucherRedeemResult ;
return 'VoucherRedeemResult(redemption: ${ _this . redemption } , pointBalance: ${ _this . pointBalance } , replayed: ${ _this . replayed } )' ;
}
}
/// @nodoc
abstract mixin class $VoucherRedeemResultCopyWith < $Res > {
factory $VoucherRedeemResultCopyWith ( VoucherRedeemResult value , $Res Function ( VoucherRedeemResult ) _then ) = _$VoucherRedeemResultCopyWithImpl ;
@ useResult
$Res call ({
VoucherRedemption redemption , int pointBalance , bool replayed
});
$VoucherRedemptionCopyWith < $Res > get redemption ;
}
/// @nodoc
class _ $VoucherRedeemResultCopyWithImpl < $Res >
implements $VoucherRedeemResultCopyWith < $Res > {
_$VoucherRedeemResultCopyWithImpl ( this . _self , this . _then );
final VoucherRedeemResult _self ;
final $Res Function ( VoucherRedeemResult ) _then ;
/// Create a copy of VoucherRedeemResult
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) @ override $Res call ({ Object ? redemption = null , Object ? pointBalance = null , Object ? replayed = null ,}) {
return _then ( VoucherRedeemResult (
redemption: null == redemption ? _self . redemption : redemption // ignore: cast_nullable_to_non_nullable
as VoucherRedemption , pointBalance: null == pointBalance ? _self . pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int , replayed: null == replayed ? _self . replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool ,
));
}
/// Create a copy of VoucherRedeemResult
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$VoucherRedemptionCopyWith < $Res > get redemption {
return $VoucherRedemptionCopyWith < $Res > ( _self . redemption , ( value ) {
return _then ( _self . copyWith ( redemption: value ));
});
}
}
/// Adds pattern-matching-related methods to [VoucherRedeemResult].
extension VoucherRedeemResultPatterns on VoucherRedeemResult {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ( TResult Function ( _VoucherRedeemResult value ) ? $default ,{ required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _VoucherRedeemResult () when $default != null :
return $default ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ( TResult Function ( _VoucherRedeemResult value ) $default ,){
final _that = this ;
switch ( _that ) {
case _VoucherRedeemResult () :
return $default ( _that ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ( TResult ? Function ( _VoucherRedeemResult value ) ? $default ,){
final _that = this ;
switch ( _that ) {
case _VoucherRedeemResult () when $default != null :
return $default ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ( TResult Function ( VoucherRedemption redemption , int pointBalance , bool replayed ) ? $default ,{ required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _VoucherRedeemResult () when $default != null :
return $default ( _that . redemption , _that . pointBalance , _that . replayed ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ( TResult Function ( VoucherRedemption redemption , int pointBalance , bool replayed ) $default ,) { final _that = this ;
switch ( _that ) {
case _VoucherRedeemResult () :
return $default ( _that . redemption , _that . pointBalance , _that . replayed ); case _:
throw StateError ( 'Unexpected subclass' );
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ( TResult ? Function ( VoucherRedemption redemption , int pointBalance , bool replayed ) ? $default ,) { final _that = this ;
switch ( _that ) {
case _VoucherRedeemResult () when $default != null :
return $default ( _that . redemption , _that . pointBalance , _that . replayed ); case _:
return null ;
}
}
}
/// @nodoc
class _VoucherRedeemResult implements VoucherRedeemResult {
const _VoucherRedeemResult ({ required this . redemption , required this . pointBalance , required this . replayed });
@ override final VoucherRedemption redemption ;
/// Saldo EnakPoint setelah ditukar.
@ override final int pointBalance ;
@ override final bool replayed ;
/// Create a copy of VoucherRedeemResult
/// with the given fields replaced by the non-null parameter values.
@ override @ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$VoucherRedeemResultCopyWith < _VoucherRedeemResult > get copyWith => __$VoucherRedeemResultCopyWithImpl < _VoucherRedeemResult > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _VoucherRedeemResult && ( identical ( other . redemption , redemption ) || other . redemption == redemption ) && ( identical ( other . pointBalance , pointBalance ) || other . pointBalance == pointBalance ) && ( identical ( other . replayed , replayed ) || other . replayed == replayed ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , redemption , pointBalance , replayed );
}
@ override
String toString () {
return 'VoucherRedeemResult(redemption: $ redemption , pointBalance: $ pointBalance , replayed: $ replayed )' ;
}
}
/// @nodoc
abstract mixin class _ $VoucherRedeemResultCopyWith < $Res > implements $VoucherRedeemResultCopyWith < $Res > {
factory _$VoucherRedeemResultCopyWith ( _VoucherRedeemResult value , $Res Function ( _VoucherRedeemResult ) _then ) = __$VoucherRedeemResultCopyWithImpl ;
@ override @ useResult
$Res call ({
VoucherRedemption redemption , int pointBalance , bool replayed
});
@ override $VoucherRedemptionCopyWith < $Res > get redemption ;
}
/// @nodoc
class __ $VoucherRedeemResultCopyWithImpl < $Res >
implements _$VoucherRedeemResultCopyWith < $Res > {
__$VoucherRedeemResultCopyWithImpl ( this . _self , this . _then );
final _VoucherRedeemResult _self ;
final $Res Function ( _VoucherRedeemResult ) _then ;
/// Create a copy of VoucherRedeemResult
/// with the given fields replaced by the non-null parameter values.
@ override @ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? redemption = null , Object ? pointBalance = null , Object ? replayed = null ,}) {
return _then ( _VoucherRedeemResult (
redemption: null == redemption ? _self . redemption : redemption // ignore: cast_nullable_to_non_nullable
as VoucherRedemption , pointBalance: null == pointBalance ? _self . pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int , replayed: null == replayed ? _self . replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool ,
));
}
/// Create a copy of VoucherRedeemResult
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$VoucherRedemptionCopyWith < $Res > get redemption {
return $VoucherRedemptionCopyWith < $Res > ( _self . redemption , ( value ) {
return _then ( _self . copyWith ( redemption: value ));
});
}
}
2026-10-01 01:43:22 +07:00
/// @nodoc
mixin _$WalletFailure {
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is WalletFailure );
}
@ override
int get hashCode => runtimeType . hashCode ;
@ override
String toString () {
return 'WalletFailure()' ;
}
}
/// @nodoc
class $WalletFailureCopyWith < $Res > {
$WalletFailureCopyWith ( WalletFailure _ , $Res Function ( WalletFailure ) __ );
}
/// Adds pattern-matching-related methods to [WalletFailure].
extension WalletFailurePatterns on WalletFailure {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeMap < TResult extends Object ?> ({ TResult Function ( _ServerError value ) ? serverError , TResult Function ( _UnexpectedError value ) ? unexpectedError , TResult Function ( _Unauthorized value ) ? unauthorized , TResult Function ( _InvalidRequest value ) ? invalidRequest , TResult Function ( _Rejected value ) ? rejected , TResult Function ( _NotFound value ) ? notFound , TResult Function ( _TooManyRequests value ) ? tooManyRequests , TResult Function ( _InternalError value ) ? internalError , TResult Function ( _PinNotSet value ) ? pinNotSet , TResult Function ( _PinInvalid value ) ? pinInvalid , TResult Function ( _PinLocked value ) ? pinLocked , TResult Function ( _TransferBlocked value ) ? transferBlocked , required TResult orElse (),}){
final _that = this ;
switch ( _that ) {
case _ServerError () when serverError != null :
return serverError ( _that ); case _UnexpectedError () when unexpectedError != null :
return unexpectedError ( _that ); case _Unauthorized () when unauthorized != null :
return unauthorized ( _that ); case _InvalidRequest () when invalidRequest != null :
return invalidRequest ( _that ); case _Rejected () when rejected != null :
return rejected ( _that ); case _NotFound () when notFound != null :
return notFound ( _that ); case _TooManyRequests () when tooManyRequests != null :
return tooManyRequests ( _that ); case _InternalError () when internalError != null :
return internalError ( _that ); case _PinNotSet () when pinNotSet != null :
return pinNotSet ( _that ); case _PinInvalid () when pinInvalid != null :
return pinInvalid ( _that ); case _PinLocked () when pinLocked != null :
return pinLocked ( _that ); case _TransferBlocked () when transferBlocked != null :
return transferBlocked ( _that ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult map < TResult extends Object ?> ({ required TResult Function ( _ServerError value ) serverError , required TResult Function ( _UnexpectedError value ) unexpectedError , required TResult Function ( _Unauthorized value ) unauthorized , required TResult Function ( _InvalidRequest value ) invalidRequest , required TResult Function ( _Rejected value ) rejected , required TResult Function ( _NotFound value ) notFound , required TResult Function ( _TooManyRequests value ) tooManyRequests , required TResult Function ( _InternalError value ) internalError , required TResult Function ( _PinNotSet value ) pinNotSet , required TResult Function ( _PinInvalid value ) pinInvalid , required TResult Function ( _PinLocked value ) pinLocked , required TResult Function ( _TransferBlocked value ) transferBlocked ,}){
final _that = this ;
switch ( _that ) {
case _ServerError () :
return serverError ( _that ); case _UnexpectedError () :
return unexpectedError ( _that ); case _Unauthorized () :
return unauthorized ( _that ); case _InvalidRequest () :
return invalidRequest ( _that ); case _Rejected () :
return rejected ( _that ); case _NotFound () :
return notFound ( _that ); case _TooManyRequests () :
return tooManyRequests ( _that ); case _InternalError () :
return internalError ( _that ); case _PinNotSet () :
return pinNotSet ( _that ); case _PinInvalid () :
return pinInvalid ( _that ); case _PinLocked () :
return pinLocked ( _that ); case _TransferBlocked () :
return transferBlocked ( _that );}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? mapOrNull < TResult extends Object ?> ({ TResult ? Function ( _ServerError value ) ? serverError , TResult ? Function ( _UnexpectedError value ) ? unexpectedError , TResult ? Function ( _Unauthorized value ) ? unauthorized , TResult ? Function ( _InvalidRequest value ) ? invalidRequest , TResult ? Function ( _Rejected value ) ? rejected , TResult ? Function ( _NotFound value ) ? notFound , TResult ? Function ( _TooManyRequests value ) ? tooManyRequests , TResult ? Function ( _InternalError value ) ? internalError , TResult ? Function ( _PinNotSet value ) ? pinNotSet , TResult ? Function ( _PinInvalid value ) ? pinInvalid , TResult ? Function ( _PinLocked value ) ? pinLocked , TResult ? Function ( _TransferBlocked value ) ? transferBlocked ,}){
final _that = this ;
switch ( _that ) {
case _ServerError () when serverError != null :
return serverError ( _that ); case _UnexpectedError () when unexpectedError != null :
return unexpectedError ( _that ); case _Unauthorized () when unauthorized != null :
return unauthorized ( _that ); case _InvalidRequest () when invalidRequest != null :
return invalidRequest ( _that ); case _Rejected () when rejected != null :
return rejected ( _that ); case _NotFound () when notFound != null :
return notFound ( _that ); case _TooManyRequests () when tooManyRequests != null :
return tooManyRequests ( _that ); case _InternalError () when internalError != null :
return internalError ( _that ); case _PinNotSet () when pinNotSet != null :
return pinNotSet ( _that ); case _PinInvalid () when pinInvalid != null :
return pinInvalid ( _that ); case _PinLocked () when pinLocked != null :
return pinLocked ( _that ); case _TransferBlocked () when transferBlocked != null :
return transferBlocked ( _that ); case _:
return null ;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@ optionalTypeArgs TResult maybeWhen < TResult extends Object ?> ({ TResult Function ( ApiFailure failure ) ? serverError , TResult Function () ? unexpectedError , TResult Function () ? unauthorized , TResult Function () ? invalidRequest , TResult Function ( String cause ) ? rejected , TResult Function () ? notFound , TResult Function ( int retryAfterSeconds ) ? tooManyRequests , TResult Function () ? internalError , TResult Function () ? pinNotSet , TResult Function ( int ? remainingAttempts ) ? pinInvalid , TResult Function ( DateTime ? lockedUntil ) ? pinLocked , TResult Function ( DateTime ? transferBlockedUntil ) ? transferBlocked , required TResult orElse (),}) { final _that = this ;
switch ( _that ) {
case _ServerError () when serverError != null :
return serverError ( _that . failure ); case _UnexpectedError () when unexpectedError != null :
return unexpectedError (); case _Unauthorized () when unauthorized != null :
return unauthorized (); case _InvalidRequest () when invalidRequest != null :
return invalidRequest (); case _Rejected () when rejected != null :
return rejected ( _that . cause ); case _NotFound () when notFound != null :
return notFound (); case _TooManyRequests () when tooManyRequests != null :
return tooManyRequests ( _that . retryAfterSeconds ); case _InternalError () when internalError != null :
return internalError (); case _PinNotSet () when pinNotSet != null :
return pinNotSet (); case _PinInvalid () when pinInvalid != null :
return pinInvalid ( _that . remainingAttempts ); case _PinLocked () when pinLocked != null :
return pinLocked ( _that . lockedUntil ); case _TransferBlocked () when transferBlocked != null :
return transferBlocked ( _that . transferBlockedUntil ); case _:
return orElse ();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@ optionalTypeArgs TResult when < TResult extends Object ?> ({ required TResult Function ( ApiFailure failure ) serverError , required TResult Function () unexpectedError , required TResult Function () unauthorized , required TResult Function () invalidRequest , required TResult Function ( String cause ) rejected , required TResult Function () notFound , required TResult Function ( int retryAfterSeconds ) tooManyRequests , required TResult Function () internalError , required TResult Function () pinNotSet , required TResult Function ( int ? remainingAttempts ) pinInvalid , required TResult Function ( DateTime ? lockedUntil ) pinLocked , required TResult Function ( DateTime ? transferBlockedUntil ) transferBlocked ,}) { final _that = this ;
switch ( _that ) {
case _ServerError () :
return serverError ( _that . failure ); case _UnexpectedError () :
return unexpectedError (); case _Unauthorized () :
return unauthorized (); case _InvalidRequest () :
return invalidRequest (); case _Rejected () :
return rejected ( _that . cause ); case _NotFound () :
return notFound (); case _TooManyRequests () :
return tooManyRequests ( _that . retryAfterSeconds ); case _InternalError () :
return internalError (); case _PinNotSet () :
return pinNotSet (); case _PinInvalid () :
return pinInvalid ( _that . remainingAttempts ); case _PinLocked () :
return pinLocked ( _that . lockedUntil ); case _TransferBlocked () :
return transferBlocked ( _that . transferBlockedUntil );}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@ optionalTypeArgs TResult ? whenOrNull < TResult extends Object ?> ({ TResult ? Function ( ApiFailure failure ) ? serverError , TResult ? Function () ? unexpectedError , TResult ? Function () ? unauthorized , TResult ? Function () ? invalidRequest , TResult ? Function ( String cause ) ? rejected , TResult ? Function () ? notFound , TResult ? Function ( int retryAfterSeconds ) ? tooManyRequests , TResult ? Function () ? internalError , TResult ? Function () ? pinNotSet , TResult ? Function ( int ? remainingAttempts ) ? pinInvalid , TResult ? Function ( DateTime ? lockedUntil ) ? pinLocked , TResult ? Function ( DateTime ? transferBlockedUntil ) ? transferBlocked ,}) { final _that = this ;
switch ( _that ) {
case _ServerError () when serverError != null :
return serverError ( _that . failure ); case _UnexpectedError () when unexpectedError != null :
return unexpectedError (); case _Unauthorized () when unauthorized != null :
return unauthorized (); case _InvalidRequest () when invalidRequest != null :
return invalidRequest (); case _Rejected () when rejected != null :
return rejected ( _that . cause ); case _NotFound () when notFound != null :
return notFound (); case _TooManyRequests () when tooManyRequests != null :
return tooManyRequests ( _that . retryAfterSeconds ); case _InternalError () when internalError != null :
return internalError (); case _PinNotSet () when pinNotSet != null :
return pinNotSet (); case _PinInvalid () when pinInvalid != null :
return pinInvalid ( _that . remainingAttempts ); case _PinLocked () when pinLocked != null :
return pinLocked ( _that . lockedUntil ); case _TransferBlocked () when transferBlocked != null :
return transferBlocked ( _that . transferBlockedUntil ); case _:
return null ;
}
}
}
/// @nodoc
class _ServerError extends WalletFailure {
const _ServerError ( this . failure ) : super . _ ();
final ApiFailure failure ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$ServerErrorCopyWith < _ServerError > get copyWith => __$ServerErrorCopyWithImpl < _ServerError > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _ServerError && ( identical ( other . failure , failure ) || other . failure == failure ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , failure );
}
@ override
String toString () {
return 'WalletFailure.serverError(failure: $ failure )' ;
}
}
/// @nodoc
abstract mixin class _ $ServerErrorCopyWith < $Res > implements $WalletFailureCopyWith < $Res > {
factory _$ServerErrorCopyWith ( _ServerError value , $Res Function ( _ServerError ) _then ) = __$ServerErrorCopyWithImpl ;
@ useResult
$Res call ({
ApiFailure failure
});
$ApiFailureCopyWith < $Res > get failure ;
}
/// @nodoc
class __ $ServerErrorCopyWithImpl < $Res >
implements _$ServerErrorCopyWith < $Res > {
__$ServerErrorCopyWithImpl ( this . _self , this . _then );
final _ServerError _self ;
final $Res Function ( _ServerError ) _then ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? failure = null ,}) {
return _then ( _ServerError (
null == failure ? _self . failure : failure // ignore: cast_nullable_to_non_nullable
as ApiFailure ,
));
}
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( 'vm:prefer-inline' )
$ApiFailureCopyWith < $Res > get failure {
return $ApiFailureCopyWith < $Res > ( _self . failure , ( value ) {
return _then ( _self . copyWith ( failure: value ));
});
}
}
/// @nodoc
class _UnexpectedError extends WalletFailure {
const _UnexpectedError () : super . _ ();
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _UnexpectedError );
}
@ override
int get hashCode => runtimeType . hashCode ;
@ override
String toString () {
return 'WalletFailure.unexpectedError()' ;
}
}
/// @nodoc
class _Unauthorized extends WalletFailure {
const _Unauthorized () : super . _ ();
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _Unauthorized );
}
@ override
int get hashCode => runtimeType . hashCode ;
@ override
String toString () {
return 'WalletFailure.unauthorized()' ;
}
}
/// @nodoc
class _InvalidRequest extends WalletFailure {
const _InvalidRequest () : super . _ ();
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _InvalidRequest );
}
@ override
int get hashCode => runtimeType . hashCode ;
@ override
String toString () {
return 'WalletFailure.invalidRequest()' ;
}
}
/// @nodoc
class _Rejected extends WalletFailure {
const _Rejected ( this . cause ) : super . _ ();
final String cause ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$RejectedCopyWith < _Rejected > get copyWith => __$RejectedCopyWithImpl < _Rejected > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _Rejected && ( identical ( other . cause , cause ) || other . cause == cause ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , cause );
}
@ override
String toString () {
return 'WalletFailure.rejected(cause: $ cause )' ;
}
}
/// @nodoc
abstract mixin class _ $RejectedCopyWith < $Res > implements $WalletFailureCopyWith < $Res > {
factory _$RejectedCopyWith ( _Rejected value , $Res Function ( _Rejected ) _then ) = __$RejectedCopyWithImpl ;
@ useResult
$Res call ({
String cause
});
}
/// @nodoc
class __ $RejectedCopyWithImpl < $Res >
implements _$RejectedCopyWith < $Res > {
__$RejectedCopyWithImpl ( this . _self , this . _then );
final _Rejected _self ;
final $Res Function ( _Rejected ) _then ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? cause = null ,}) {
return _then ( _Rejected (
null == cause ? _self . cause : cause // ignore: cast_nullable_to_non_nullable
as String ,
));
}
}
/// @nodoc
class _NotFound extends WalletFailure {
const _NotFound () : super . _ ();
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _NotFound );
}
@ override
int get hashCode => runtimeType . hashCode ;
@ override
String toString () {
return 'WalletFailure.notFound()' ;
}
}
/// @nodoc
class _TooManyRequests extends WalletFailure {
const _TooManyRequests ( this . retryAfterSeconds ) : super . _ ();
final int retryAfterSeconds ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$TooManyRequestsCopyWith < _TooManyRequests > get copyWith => __$TooManyRequestsCopyWithImpl < _TooManyRequests > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _TooManyRequests && ( identical ( other . retryAfterSeconds , retryAfterSeconds ) || other . retryAfterSeconds == retryAfterSeconds ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , retryAfterSeconds );
}
@ override
String toString () {
return 'WalletFailure.tooManyRequests(retryAfterSeconds: $ retryAfterSeconds )' ;
}
}
/// @nodoc
abstract mixin class _ $TooManyRequestsCopyWith < $Res > implements $WalletFailureCopyWith < $Res > {
factory _$TooManyRequestsCopyWith ( _TooManyRequests value , $Res Function ( _TooManyRequests ) _then ) = __$TooManyRequestsCopyWithImpl ;
@ useResult
$Res call ({
int retryAfterSeconds
});
}
/// @nodoc
class __ $TooManyRequestsCopyWithImpl < $Res >
implements _$TooManyRequestsCopyWith < $Res > {
__$TooManyRequestsCopyWithImpl ( this . _self , this . _then );
final _TooManyRequests _self ;
final $Res Function ( _TooManyRequests ) _then ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? retryAfterSeconds = null ,}) {
return _then ( _TooManyRequests (
null == retryAfterSeconds ? _self . retryAfterSeconds : retryAfterSeconds // ignore: cast_nullable_to_non_nullable
as int ,
));
}
}
/// @nodoc
class _InternalError extends WalletFailure {
const _InternalError () : super . _ ();
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _InternalError );
}
@ override
int get hashCode => runtimeType . hashCode ;
@ override
String toString () {
return 'WalletFailure.internalError()' ;
}
}
/// @nodoc
class _PinNotSet extends WalletFailure {
const _PinNotSet () : super . _ ();
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _PinNotSet );
}
@ override
int get hashCode => runtimeType . hashCode ;
@ override
String toString () {
return 'WalletFailure.pinNotSet()' ;
}
}
/// @nodoc
class _PinInvalid extends WalletFailure {
const _PinInvalid ( this . remainingAttempts ) : super . _ ();
final int ? remainingAttempts ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$PinInvalidCopyWith < _PinInvalid > get copyWith => __$PinInvalidCopyWithImpl < _PinInvalid > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _PinInvalid && ( identical ( other . remainingAttempts , remainingAttempts ) || other . remainingAttempts == remainingAttempts ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , remainingAttempts );
}
@ override
String toString () {
return 'WalletFailure.pinInvalid(remainingAttempts: $ remainingAttempts )' ;
}
}
/// @nodoc
abstract mixin class _ $PinInvalidCopyWith < $Res > implements $WalletFailureCopyWith < $Res > {
factory _$PinInvalidCopyWith ( _PinInvalid value , $Res Function ( _PinInvalid ) _then ) = __$PinInvalidCopyWithImpl ;
@ useResult
$Res call ({
int ? remainingAttempts
});
}
/// @nodoc
class __ $PinInvalidCopyWithImpl < $Res >
implements _$PinInvalidCopyWith < $Res > {
__$PinInvalidCopyWithImpl ( this . _self , this . _then );
final _PinInvalid _self ;
final $Res Function ( _PinInvalid ) _then ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? remainingAttempts = freezed ,}) {
return _then ( _PinInvalid (
freezed == remainingAttempts ? _self . remainingAttempts : remainingAttempts // ignore: cast_nullable_to_non_nullable
as int ? ,
));
}
}
/// @nodoc
class _PinLocked extends WalletFailure {
const _PinLocked ( this . lockedUntil ) : super . _ ();
final DateTime ? lockedUntil ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$PinLockedCopyWith < _PinLocked > get copyWith => __$PinLockedCopyWithImpl < _PinLocked > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _PinLocked && ( identical ( other . lockedUntil , lockedUntil ) || other . lockedUntil == lockedUntil ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , lockedUntil );
}
@ override
String toString () {
return 'WalletFailure.pinLocked(lockedUntil: $ lockedUntil )' ;
}
}
/// @nodoc
abstract mixin class _ $PinLockedCopyWith < $Res > implements $WalletFailureCopyWith < $Res > {
factory _$PinLockedCopyWith ( _PinLocked value , $Res Function ( _PinLocked ) _then ) = __$PinLockedCopyWithImpl ;
@ useResult
$Res call ({
DateTime ? lockedUntil
});
}
/// @nodoc
class __ $PinLockedCopyWithImpl < $Res >
implements _$PinLockedCopyWith < $Res > {
__$PinLockedCopyWithImpl ( this . _self , this . _then );
final _PinLocked _self ;
final $Res Function ( _PinLocked ) _then ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? lockedUntil = freezed ,}) {
return _then ( _PinLocked (
freezed == lockedUntil ? _self . lockedUntil : lockedUntil // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
/// @nodoc
class _TransferBlocked extends WalletFailure {
const _TransferBlocked ( this . transferBlockedUntil ) : super . _ ();
final DateTime ? transferBlockedUntil ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ pragma ( 'vm:prefer-inline' )
_$TransferBlockedCopyWith < _TransferBlocked > get copyWith => __$TransferBlockedCopyWithImpl < _TransferBlocked > ( this , _$identity );
@ override
bool operator == ( Object other ) {
return identical ( this , other ) || ( other . runtimeType == runtimeType && other is _TransferBlocked && ( identical ( other . transferBlockedUntil , transferBlockedUntil ) || other . transferBlockedUntil == transferBlockedUntil ));
}
@ override
int get hashCode {
return Object . hash ( runtimeType , transferBlockedUntil );
}
@ override
String toString () {
return 'WalletFailure.transferBlocked(transferBlockedUntil: $ transferBlockedUntil )' ;
}
}
/// @nodoc
abstract mixin class _ $TransferBlockedCopyWith < $Res > implements $WalletFailureCopyWith < $Res > {
factory _$TransferBlockedCopyWith ( _TransferBlocked value , $Res Function ( _TransferBlocked ) _then ) = __$TransferBlockedCopyWithImpl ;
@ useResult
$Res call ({
DateTime ? transferBlockedUntil
});
}
/// @nodoc
class __ $TransferBlockedCopyWithImpl < $Res >
implements _$TransferBlockedCopyWith < $Res > {
__$TransferBlockedCopyWithImpl ( this . _self , this . _then );
final _TransferBlocked _self ;
final $Res Function ( _TransferBlocked ) _then ;
/// Create a copy of WalletFailure
/// with the given fields replaced by the non-null parameter values.
@ pragma ( 'vm:prefer-inline' ) $Res call ({ Object ? transferBlockedUntil = freezed ,}) {
return _then ( _TransferBlocked (
freezed == transferBlockedUntil ? _self . transferBlockedUntil : transferBlockedUntil // ignore: cast_nullable_to_non_nullable
as DateTime ? ,
));
}
}
// dart format on