// 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 'auth_status.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND // dart format off T _$identity(T value) => value; /// @nodoc mixin _$AuthStatus { @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is AuthStatus); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'AuthStatus()'; } } /// @nodoc class $AuthStatusCopyWith<$Res> { $AuthStatusCopyWith(AuthStatus _, $Res Function(AuthStatus) __); } /// Adds pattern-matching-related methods to [AuthStatus]. extension AuthStatusPatterns on AuthStatus { /// 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( SignedOut value)? signedOut,TResult Function( SignedIn value)? signedIn,TResult Function( PasswordRecovery value)? passwordRecovery,required TResult orElse(),}){ final _that = this; switch (_that) { case SignedOut() when signedOut != null: return signedOut(_that);case SignedIn() when signedIn != null: return signedIn(_that);case PasswordRecovery() when passwordRecovery != null: return passwordRecovery(_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( SignedOut value) signedOut,required TResult Function( SignedIn value) signedIn,required TResult Function( PasswordRecovery value) passwordRecovery,}){ final _that = this; switch (_that) { case SignedOut(): return signedOut(_that);case SignedIn(): return signedIn(_that);case PasswordRecovery(): return passwordRecovery(_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? Function( SignedOut value)? signedOut,TResult? Function( SignedIn value)? signedIn,TResult? Function( PasswordRecovery value)? passwordRecovery,}){ final _that = this; switch (_that) { case SignedOut() when signedOut != null: return signedOut(_that);case SignedIn() when signedIn != null: return signedIn(_that);case PasswordRecovery() when passwordRecovery != null: return passwordRecovery(_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()? signedOut,TResult Function( AuthUser user)? signedIn,TResult Function( AuthUser user)? passwordRecovery,required TResult orElse(),}) {final _that = this; switch (_that) { case SignedOut() when signedOut != null: return signedOut();case SignedIn() when signedIn != null: return signedIn(_that.user);case PasswordRecovery() when passwordRecovery != null: return passwordRecovery(_that.user);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() signedOut,required TResult Function( AuthUser user) signedIn,required TResult Function( AuthUser user) passwordRecovery,}) {final _that = this; switch (_that) { case SignedOut(): return signedOut();case SignedIn(): return signedIn(_that.user);case PasswordRecovery(): return passwordRecovery(_that.user);} } /// 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()? signedOut,TResult? Function( AuthUser user)? signedIn,TResult? Function( AuthUser user)? passwordRecovery,}) {final _that = this; switch (_that) { case SignedOut() when signedOut != null: return signedOut();case SignedIn() when signedIn != null: return signedIn(_that.user);case PasswordRecovery() when passwordRecovery != null: return passwordRecovery(_that.user);case _: return null; } } } /// @nodoc class SignedOut extends AuthStatus { const SignedOut(): super._(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SignedOut); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'AuthStatus.signedOut()'; } } /// @nodoc class SignedIn extends AuthStatus { const SignedIn(this.user): super._(); final AuthUser user; /// Create a copy of AuthStatus /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SignedInCopyWith get copyWith => _$SignedInCopyWithImpl(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SignedIn&&(identical(other.user, user) || other.user == user)); } @override int get hashCode { return Object.hash(runtimeType,user); } @override String toString() { return 'AuthStatus.signedIn(user: $user)'; } } /// @nodoc abstract mixin class $SignedInCopyWith<$Res> implements $AuthStatusCopyWith<$Res> { factory $SignedInCopyWith(SignedIn value, $Res Function(SignedIn) _then) = _$SignedInCopyWithImpl; @useResult $Res call({ AuthUser user }); $AuthUserCopyWith<$Res> get user; } /// @nodoc class _$SignedInCopyWithImpl<$Res> implements $SignedInCopyWith<$Res> { _$SignedInCopyWithImpl(this._self, this._then); final SignedIn _self; final $Res Function(SignedIn) _then; /// Create a copy of AuthStatus /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') $Res call({Object? user = null,}) { return _then(SignedIn( null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable as AuthUser, )); } /// Create a copy of AuthStatus /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $AuthUserCopyWith<$Res> get user { return $AuthUserCopyWith<$Res>(_self.user, (value) { return _then(_self.copyWith(user: value)); }); } } /// @nodoc class PasswordRecovery extends AuthStatus { const PasswordRecovery(this.user): super._(); final AuthUser user; /// Create a copy of AuthStatus /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $PasswordRecoveryCopyWith get copyWith => _$PasswordRecoveryCopyWithImpl(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is PasswordRecovery&&(identical(other.user, user) || other.user == user)); } @override int get hashCode { return Object.hash(runtimeType,user); } @override String toString() { return 'AuthStatus.passwordRecovery(user: $user)'; } } /// @nodoc abstract mixin class $PasswordRecoveryCopyWith<$Res> implements $AuthStatusCopyWith<$Res> { factory $PasswordRecoveryCopyWith(PasswordRecovery value, $Res Function(PasswordRecovery) _then) = _$PasswordRecoveryCopyWithImpl; @useResult $Res call({ AuthUser user }); $AuthUserCopyWith<$Res> get user; } /// @nodoc class _$PasswordRecoveryCopyWithImpl<$Res> implements $PasswordRecoveryCopyWith<$Res> { _$PasswordRecoveryCopyWithImpl(this._self, this._then); final PasswordRecovery _self; final $Res Function(PasswordRecovery) _then; /// Create a copy of AuthStatus /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') $Res call({Object? user = null,}) { return _then(PasswordRecovery( null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable as AuthUser, )); } /// Create a copy of AuthStatus /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $AuthUserCopyWith<$Res> get user { return $AuthUserCopyWith<$Res>(_self.user, (value) { return _then(_self.copyWith(user: value)); }); } } // dart format on