// 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 'game_spin_bloc.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND // dart format off T _$identity(T value) => value; /// @nodoc mixin _$GameSpinEvent { String get gameId; /// Create a copy of GameSpinEvent /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $GameSpinEventCopyWith get copyWith => _$GameSpinEventCopyWithImpl(this as GameSpinEvent, _$identity); @override bool operator ==(Object other) { final _this = this as GameSpinEvent; return identical(this, other) || (other.runtimeType == runtimeType&&other is GameSpinEvent&&(identical(other.gameId, _this.gameId) || other.gameId == _this.gameId)); } @override int get hashCode { final _this = this as GameSpinEvent; return Object.hash(runtimeType,_this.gameId); } @override String toString() { final _this = this as GameSpinEvent; return 'GameSpinEvent(gameId: ${_this.gameId})'; } } /// @nodoc abstract mixin class $GameSpinEventCopyWith<$Res> { factory $GameSpinEventCopyWith(GameSpinEvent value, $Res Function(GameSpinEvent) _then) = _$GameSpinEventCopyWithImpl; @useResult $Res call({ String gameId }); } /// @nodoc class _$GameSpinEventCopyWithImpl<$Res> implements $GameSpinEventCopyWith<$Res> { _$GameSpinEventCopyWithImpl(this._self, this._then); final GameSpinEvent _self; final $Res Function(GameSpinEvent) _then; /// Create a copy of GameSpinEvent /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? gameId = null,}) { return _then(GameSpinEvent.spun( null == gameId ? _self.gameId : gameId // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [GameSpinEvent]. extension GameSpinEventPatterns on GameSpinEvent { /// 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( _Spun value)? spun,required TResult orElse(),}){ final _that = this; switch (_that) { case _Spun() when spun != null: return spun(_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( _Spun value) spun,}){ final _that = this; switch (_that) { case _Spun(): return spun(_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( _Spun value)? spun,}){ final _that = this; switch (_that) { case _Spun() when spun != null: return spun(_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( String gameId)? spun,required TResult orElse(),}) {final _that = this; switch (_that) { case _Spun() when spun != null: return spun(_that.gameId);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( String gameId) spun,}) {final _that = this; switch (_that) { case _Spun(): return spun(_that.gameId);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( String gameId)? spun,}) {final _that = this; switch (_that) { case _Spun() when spun != null: return spun(_that.gameId);case _: return null; } } } /// @nodoc class _Spun implements GameSpinEvent { const _Spun(this.gameId); @override final String gameId; /// Create a copy of GameSpinEvent /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SpunCopyWith<_Spun> get copyWith => __$SpunCopyWithImpl<_Spun>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Spun&&(identical(other.gameId, gameId) || other.gameId == gameId)); } @override int get hashCode { return Object.hash(runtimeType,gameId); } @override String toString() { return 'GameSpinEvent.spun(gameId: $gameId)'; } } /// @nodoc abstract mixin class _$SpunCopyWith<$Res> implements $GameSpinEventCopyWith<$Res> { factory _$SpunCopyWith(_Spun value, $Res Function(_Spun) _then) = __$SpunCopyWithImpl; @override @useResult $Res call({ String gameId }); } /// @nodoc class __$SpunCopyWithImpl<$Res> implements _$SpunCopyWith<$Res> { __$SpunCopyWithImpl(this._self, this._then); final _Spun _self; final $Res Function(_Spun) _then; /// Create a copy of GameSpinEvent /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? gameId = null,}) { return _then(_Spun( null == gameId ? _self.gameId : gameId // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$GameSpinState { bool get isSpinning; Option> get failureOrResultOption; /// Create a copy of GameSpinState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $GameSpinStateCopyWith get copyWith => _$GameSpinStateCopyWithImpl(this as GameSpinState, _$identity); @override bool operator ==(Object other) { final _this = this as GameSpinState; return identical(this, other) || (other.runtimeType == runtimeType&&other is GameSpinState&&(identical(other.isSpinning, _this.isSpinning) || other.isSpinning == _this.isSpinning)&&(identical(other.failureOrResultOption, _this.failureOrResultOption) || other.failureOrResultOption == _this.failureOrResultOption)); } @override int get hashCode { final _this = this as GameSpinState; return Object.hash(runtimeType,_this.isSpinning,_this.failureOrResultOption); } @override String toString() { final _this = this as GameSpinState; return 'GameSpinState(isSpinning: ${_this.isSpinning}, failureOrResultOption: ${_this.failureOrResultOption})'; } } /// @nodoc abstract mixin class $GameSpinStateCopyWith<$Res> { factory $GameSpinStateCopyWith(GameSpinState value, $Res Function(GameSpinState) _then) = _$GameSpinStateCopyWithImpl; @useResult $Res call({ bool isSpinning, Option> failureOrResultOption }); } /// @nodoc class _$GameSpinStateCopyWithImpl<$Res> implements $GameSpinStateCopyWith<$Res> { _$GameSpinStateCopyWithImpl(this._self, this._then); final GameSpinState _self; final $Res Function(GameSpinState) _then; /// Create a copy of GameSpinState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? isSpinning = null,Object? failureOrResultOption = null,}) { return _then(GameSpinState( isSpinning: null == isSpinning ? _self.isSpinning : isSpinning // ignore: cast_nullable_to_non_nullable as bool,failureOrResultOption: null == failureOrResultOption ? _self.failureOrResultOption : failureOrResultOption // ignore: cast_nullable_to_non_nullable as Option>, )); } } /// Adds pattern-matching-related methods to [GameSpinState]. extension GameSpinStatePatterns on GameSpinState { /// 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( _GameSpinState value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _GameSpinState() 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( _GameSpinState value) $default,){ final _that = this; switch (_that) { case _GameSpinState(): 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( _GameSpinState value)? $default,){ final _that = this; switch (_that) { case _GameSpinState() 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( bool isSpinning, Option> failureOrResultOption)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _GameSpinState() when $default != null: return $default(_that.isSpinning,_that.failureOrResultOption);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( bool isSpinning, Option> failureOrResultOption) $default,) {final _that = this; switch (_that) { case _GameSpinState(): return $default(_that.isSpinning,_that.failureOrResultOption);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( bool isSpinning, Option> failureOrResultOption)? $default,) {final _that = this; switch (_that) { case _GameSpinState() when $default != null: return $default(_that.isSpinning,_that.failureOrResultOption);case _: return null; } } } /// @nodoc class _GameSpinState implements GameSpinState { const _GameSpinState({this.isSpinning = false, required this.failureOrResultOption}); @override@JsonKey() final bool isSpinning; @override final Option> failureOrResultOption; /// Create a copy of GameSpinState /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$GameSpinStateCopyWith<_GameSpinState> get copyWith => __$GameSpinStateCopyWithImpl<_GameSpinState>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _GameSpinState&&(identical(other.isSpinning, isSpinning) || other.isSpinning == isSpinning)&&(identical(other.failureOrResultOption, failureOrResultOption) || other.failureOrResultOption == failureOrResultOption)); } @override int get hashCode { return Object.hash(runtimeType,isSpinning,failureOrResultOption); } @override String toString() { return 'GameSpinState(isSpinning: $isSpinning, failureOrResultOption: $failureOrResultOption)'; } } /// @nodoc abstract mixin class _$GameSpinStateCopyWith<$Res> implements $GameSpinStateCopyWith<$Res> { factory _$GameSpinStateCopyWith(_GameSpinState value, $Res Function(_GameSpinState) _then) = __$GameSpinStateCopyWithImpl; @override @useResult $Res call({ bool isSpinning, Option> failureOrResultOption }); } /// @nodoc class __$GameSpinStateCopyWithImpl<$Res> implements _$GameSpinStateCopyWith<$Res> { __$GameSpinStateCopyWithImpl(this._self, this._then); final _GameSpinState _self; final $Res Function(_GameSpinState) _then; /// Create a copy of GameSpinState /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? isSpinning = null,Object? failureOrResultOption = null,}) { return _then(_GameSpinState( isSpinning: null == isSpinning ? _self.isSpinning : isSpinning // ignore: cast_nullable_to_non_nullable as bool,failureOrResultOption: null == failureOrResultOption ? _self.failureOrResultOption : failureOrResultOption // ignore: cast_nullable_to_non_nullable as Option>, )); } } // dart format on