// 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_loader_bloc.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND // dart format off T _$identity(T value) => value; /// @nodoc mixin _$WalletLoaderEvent { @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletLoaderEvent); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'WalletLoaderEvent()'; } } /// @nodoc class $WalletLoaderEventCopyWith<$Res> { $WalletLoaderEventCopyWith(WalletLoaderEvent _, $Res Function(WalletLoaderEvent) __); } /// Adds pattern-matching-related methods to [WalletLoaderEvent]. extension WalletLoaderEventPatterns on WalletLoaderEvent { /// 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 Function( _Fetched value)? fetched,TResult Function( _CoinBalanceUpdated value)? coinBalanceUpdated,TResult Function( _Cleared value)? cleared,required TResult orElse(),}){ final _that = this; switch (_that) { case _Fetched() when fetched != null: return fetched(_that);case _CoinBalanceUpdated() when coinBalanceUpdated != null: return coinBalanceUpdated(_that);case _Cleared() when cleared != null: return cleared(_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({required TResult Function( _Fetched value) fetched,required TResult Function( _CoinBalanceUpdated value) coinBalanceUpdated,required TResult Function( _Cleared value) cleared,}){ final _that = this; switch (_that) { case _Fetched(): return fetched(_that);case _CoinBalanceUpdated(): return coinBalanceUpdated(_that);case _Cleared(): return cleared(_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? Function( _Fetched value)? fetched,TResult? Function( _CoinBalanceUpdated value)? coinBalanceUpdated,TResult? Function( _Cleared value)? cleared,}){ final _that = this; switch (_that) { case _Fetched() when fetched != null: return fetched(_that);case _CoinBalanceUpdated() when coinBalanceUpdated != null: return coinBalanceUpdated(_that);case _Cleared() when cleared != null: return cleared(_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 Function()? fetched,TResult Function( int coinBalance)? coinBalanceUpdated,TResult Function()? cleared,required TResult orElse(),}) {final _that = this; switch (_that) { case _Fetched() when fetched != null: return fetched();case _CoinBalanceUpdated() when coinBalanceUpdated != null: return coinBalanceUpdated(_that.coinBalance);case _Cleared() when cleared != null: return cleared();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({required TResult Function() fetched,required TResult Function( int coinBalance) coinBalanceUpdated,required TResult Function() cleared,}) {final _that = this; switch (_that) { case _Fetched(): return fetched();case _CoinBalanceUpdated(): return coinBalanceUpdated(_that.coinBalance);case _Cleared(): return cleared();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? Function()? fetched,TResult? Function( int coinBalance)? coinBalanceUpdated,TResult? Function()? cleared,}) {final _that = this; switch (_that) { case _Fetched() when fetched != null: return fetched();case _CoinBalanceUpdated() when coinBalanceUpdated != null: return coinBalanceUpdated(_that.coinBalance);case _Cleared() when cleared != null: return cleared();case _: return null; } } } /// @nodoc class _Fetched implements WalletLoaderEvent { const _Fetched(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Fetched); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'WalletLoaderEvent.fetched()'; } } /// @nodoc class _CoinBalanceUpdated implements WalletLoaderEvent { const _CoinBalanceUpdated(this.coinBalance); final int coinBalance; /// Create a copy of WalletLoaderEvent /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$CoinBalanceUpdatedCopyWith<_CoinBalanceUpdated> get copyWith => __$CoinBalanceUpdatedCopyWithImpl<_CoinBalanceUpdated>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _CoinBalanceUpdated&&(identical(other.coinBalance, coinBalance) || other.coinBalance == coinBalance)); } @override int get hashCode { return Object.hash(runtimeType,coinBalance); } @override String toString() { return 'WalletLoaderEvent.coinBalanceUpdated(coinBalance: $coinBalance)'; } } /// @nodoc abstract mixin class _$CoinBalanceUpdatedCopyWith<$Res> implements $WalletLoaderEventCopyWith<$Res> { factory _$CoinBalanceUpdatedCopyWith(_CoinBalanceUpdated value, $Res Function(_CoinBalanceUpdated) _then) = __$CoinBalanceUpdatedCopyWithImpl; @useResult $Res call({ int coinBalance }); } /// @nodoc class __$CoinBalanceUpdatedCopyWithImpl<$Res> implements _$CoinBalanceUpdatedCopyWith<$Res> { __$CoinBalanceUpdatedCopyWithImpl(this._self, this._then); final _CoinBalanceUpdated _self; final $Res Function(_CoinBalanceUpdated) _then; /// Create a copy of WalletLoaderEvent /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') $Res call({Object? coinBalance = null,}) { return _then(_CoinBalanceUpdated( null == coinBalance ? _self.coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable as int, )); } } /// @nodoc class _Cleared implements WalletLoaderEvent { const _Cleared(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Cleared); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'WalletLoaderEvent.cleared()'; } } /// @nodoc mixin _$WalletLoaderState { WalletSummary get summary; Option get failureOption; bool get isFetching; bool get hasLoaded; /// Create a copy of WalletLoaderState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $WalletLoaderStateCopyWith get copyWith => _$WalletLoaderStateCopyWithImpl(this as WalletLoaderState, _$identity); @override bool operator ==(Object other) { final _this = this as WalletLoaderState; return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletLoaderState&&(identical(other.summary, _this.summary) || other.summary == _this.summary)&&(identical(other.failureOption, _this.failureOption) || other.failureOption == _this.failureOption)&&(identical(other.isFetching, _this.isFetching) || other.isFetching == _this.isFetching)&&(identical(other.hasLoaded, _this.hasLoaded) || other.hasLoaded == _this.hasLoaded)); } @override int get hashCode { final _this = this as WalletLoaderState; return Object.hash(runtimeType,_this.summary,_this.failureOption,_this.isFetching,_this.hasLoaded); } @override String toString() { final _this = this as WalletLoaderState; return 'WalletLoaderState(summary: ${_this.summary}, failureOption: ${_this.failureOption}, isFetching: ${_this.isFetching}, hasLoaded: ${_this.hasLoaded})'; } } /// @nodoc abstract mixin class $WalletLoaderStateCopyWith<$Res> { factory $WalletLoaderStateCopyWith(WalletLoaderState value, $Res Function(WalletLoaderState) _then) = _$WalletLoaderStateCopyWithImpl; @useResult $Res call({ WalletSummary summary, Option failureOption, bool isFetching, bool hasLoaded }); $WalletSummaryCopyWith<$Res> get summary; } /// @nodoc class _$WalletLoaderStateCopyWithImpl<$Res> implements $WalletLoaderStateCopyWith<$Res> { _$WalletLoaderStateCopyWithImpl(this._self, this._then); final WalletLoaderState _self; final $Res Function(WalletLoaderState) _then; /// Create a copy of WalletLoaderState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? summary = null,Object? failureOption = null,Object? isFetching = null,Object? hasLoaded = null,}) { return _then(WalletLoaderState( summary: null == summary ? _self.summary : summary // ignore: cast_nullable_to_non_nullable as WalletSummary,failureOption: null == failureOption ? _self.failureOption : failureOption // ignore: cast_nullable_to_non_nullable as Option,isFetching: null == isFetching ? _self.isFetching : isFetching // ignore: cast_nullable_to_non_nullable as bool,hasLoaded: null == hasLoaded ? _self.hasLoaded : hasLoaded // ignore: cast_nullable_to_non_nullable as bool, )); } /// Create a copy of WalletLoaderState /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $WalletSummaryCopyWith<$Res> get summary { return $WalletSummaryCopyWith<$Res>(_self.summary, (value) { return _then(_self.copyWith(summary: value)); }); } } /// Adds pattern-matching-related methods to [WalletLoaderState]. extension WalletLoaderStatePatterns on WalletLoaderState { /// 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 Function( _WalletLoaderState value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _WalletLoaderState() 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 Function( _WalletLoaderState value) $default,){ final _that = this; switch (_that) { case _WalletLoaderState(): 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? Function( _WalletLoaderState value)? $default,){ final _that = this; switch (_that) { case _WalletLoaderState() 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 Function( WalletSummary summary, Option failureOption, bool isFetching, bool hasLoaded)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _WalletLoaderState() when $default != null: return $default(_that.summary,_that.failureOption,_that.isFetching,_that.hasLoaded);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 Function( WalletSummary summary, Option failureOption, bool isFetching, bool hasLoaded) $default,) {final _that = this; switch (_that) { case _WalletLoaderState(): return $default(_that.summary,_that.failureOption,_that.isFetching,_that.hasLoaded);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? Function( WalletSummary summary, Option failureOption, bool isFetching, bool hasLoaded)? $default,) {final _that = this; switch (_that) { case _WalletLoaderState() when $default != null: return $default(_that.summary,_that.failureOption,_that.isFetching,_that.hasLoaded);case _: return null; } } } /// @nodoc class _WalletLoaderState implements WalletLoaderState { const _WalletLoaderState({required this.summary, required this.failureOption, this.isFetching = false, this.hasLoaded = false}); @override final WalletSummary summary; @override final Option failureOption; @override@JsonKey() final bool isFetching; @override@JsonKey() final bool hasLoaded; /// Create a copy of WalletLoaderState /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$WalletLoaderStateCopyWith<_WalletLoaderState> get copyWith => __$WalletLoaderStateCopyWithImpl<_WalletLoaderState>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletLoaderState&&(identical(other.summary, summary) || other.summary == summary)&&(identical(other.failureOption, failureOption) || other.failureOption == failureOption)&&(identical(other.isFetching, isFetching) || other.isFetching == isFetching)&&(identical(other.hasLoaded, hasLoaded) || other.hasLoaded == hasLoaded)); } @override int get hashCode { return Object.hash(runtimeType,summary,failureOption,isFetching,hasLoaded); } @override String toString() { return 'WalletLoaderState(summary: $summary, failureOption: $failureOption, isFetching: $isFetching, hasLoaded: $hasLoaded)'; } } /// @nodoc abstract mixin class _$WalletLoaderStateCopyWith<$Res> implements $WalletLoaderStateCopyWith<$Res> { factory _$WalletLoaderStateCopyWith(_WalletLoaderState value, $Res Function(_WalletLoaderState) _then) = __$WalletLoaderStateCopyWithImpl; @override @useResult $Res call({ WalletSummary summary, Option failureOption, bool isFetching, bool hasLoaded }); @override $WalletSummaryCopyWith<$Res> get summary; } /// @nodoc class __$WalletLoaderStateCopyWithImpl<$Res> implements _$WalletLoaderStateCopyWith<$Res> { __$WalletLoaderStateCopyWithImpl(this._self, this._then); final _WalletLoaderState _self; final $Res Function(_WalletLoaderState) _then; /// Create a copy of WalletLoaderState /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? summary = null,Object? failureOption = null,Object? isFetching = null,Object? hasLoaded = null,}) { return _then(_WalletLoaderState( summary: null == summary ? _self.summary : summary // ignore: cast_nullable_to_non_nullable as WalletSummary,failureOption: null == failureOption ? _self.failureOption : failureOption // ignore: cast_nullable_to_non_nullable as Option,isFetching: null == isFetching ? _self.isFetching : isFetching // ignore: cast_nullable_to_non_nullable as bool,hasLoaded: null == hasLoaded ? _self.hasLoaded : hasLoaded // ignore: cast_nullable_to_non_nullable as bool, )); } /// Create a copy of WalletLoaderState /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $WalletSummaryCopyWith<$Res> get summary { return $WalletSummaryCopyWith<$Res>(_self.summary, (value) { return _then(_self.copyWith(summary: value)); }); } } // dart format on