2021-06-19 15:41:19 +00:00
// GENERATED CODE - DO NOT MODIFY BY HAND
2021-07-28 05:41:39 +00:00
// 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
2021-06-19 15:41:19 +00:00
part of ' auth_state.dart ' ;
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _ $identity < T > ( T value ) = > value ;
final _privateConstructorUsedError = UnsupportedError (
' It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it. \n Please check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods ' ) ;
/// @nodoc
class _ $AuthStateTearOff {
const _ $AuthStateTearOff ( ) ;
2021-09-04 08:53:58 +00:00
Authenticated authenticated ( UserProfile userProfile ) {
2021-07-12 15:27:58 +00:00
return Authenticated (
2021-09-04 08:53:58 +00:00
userProfile ,
2021-07-12 15:27:58 +00:00
) ;
2021-06-19 15:41:19 +00:00
}
2021-07-12 15:27:58 +00:00
Unauthenticated unauthenticated ( UserError error ) {
return Unauthenticated (
error ,
) ;
}
_Initial initial ( ) {
return const _Initial ( ) ;
2021-06-19 15:41:19 +00:00
}
}
/// @nodoc
const $AuthState = _ $AuthStateTearOff ( ) ;
/// @nodoc
mixin _ $AuthState {
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-09-04 08:53:58 +00:00
required TResult Function ( UserProfile userProfile ) authenticated ,
2021-07-12 15:27:58 +00:00
required TResult Function ( UserError error ) unauthenticated ,
required TResult Function ( ) initial ,
2021-06-19 15:41:19 +00:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-09-04 08:53:58 +00:00
TResult Function ( UserProfile userProfile ) ? authenticated ,
2021-07-12 15:27:58 +00:00
TResult Function ( UserError error ) ? unauthenticated ,
TResult Function ( ) ? initial ,
2021-06-19 15:41:19 +00:00
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( Authenticated value ) authenticated ,
required TResult Function ( Unauthenticated value ) unauthenticated ,
2021-07-12 15:27:58 +00:00
required TResult Function ( _Initial value ) initial ,
2021-06-19 15:41:19 +00:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Authenticated value ) ? authenticated ,
TResult Function ( Unauthenticated value ) ? unauthenticated ,
2021-07-12 15:27:58 +00:00
TResult Function ( _Initial value ) ? initial ,
2021-06-19 15:41:19 +00:00
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $AuthStateCopyWith < $Res > {
factory $AuthStateCopyWith ( AuthState value , $Res Function ( AuthState ) then ) =
_ $AuthStateCopyWithImpl < $Res > ;
}
/// @nodoc
class _ $AuthStateCopyWithImpl < $Res > implements $AuthStateCopyWith < $Res > {
_ $AuthStateCopyWithImpl ( this . _value , this . _then ) ;
final AuthState _value ;
// ignore: unused_field
final $Res Function ( AuthState ) _then ;
}
/// @nodoc
abstract class $AuthenticatedCopyWith < $Res > {
factory $AuthenticatedCopyWith (
Authenticated value , $Res Function ( Authenticated ) then ) =
_ $AuthenticatedCopyWithImpl < $Res > ;
2021-09-04 08:53:58 +00:00
$Res call ( { UserProfile userProfile } ) ;
2021-06-19 15:41:19 +00:00
}
/// @nodoc
class _ $AuthenticatedCopyWithImpl < $Res > extends _ $AuthStateCopyWithImpl < $Res >
implements $AuthenticatedCopyWith < $Res > {
_ $AuthenticatedCopyWithImpl (
Authenticated _value , $Res Function ( Authenticated ) _then )
: super ( _value , ( v ) = > _then ( v as Authenticated ) ) ;
@ override
Authenticated get _value = > super . _value as Authenticated ;
2021-07-12 15:27:58 +00:00
@ override
$Res call ( {
2021-09-04 08:53:58 +00:00
Object ? userProfile = freezed ,
2021-07-12 15:27:58 +00:00
} ) {
return _then ( Authenticated (
2021-09-04 08:53:58 +00:00
userProfile = = freezed
? _value . userProfile
: userProfile // ignore: cast_nullable_to_non_nullable
as UserProfile ,
2021-07-12 15:27:58 +00:00
) ) ;
}
2021-06-19 15:41:19 +00:00
}
/// @nodoc
class _ $Authenticated implements Authenticated {
2021-09-04 08:53:58 +00:00
const _ $Authenticated ( this . userProfile ) ;
2021-07-12 15:27:58 +00:00
@ override
2021-09-04 08:53:58 +00:00
final UserProfile userProfile ;
2021-06-19 15:41:19 +00:00
@ override
String toString ( ) {
2021-09-04 08:53:58 +00:00
return ' AuthState.authenticated(userProfile: $ userProfile ) ' ;
2021-06-19 15:41:19 +00:00
}
@ override
bool operator = = ( dynamic other ) {
2021-07-12 15:27:58 +00:00
return identical ( this , other ) | |
( other is Authenticated & &
2021-09-04 08:53:58 +00:00
( identical ( other . userProfile , userProfile ) | |
2021-07-12 15:27:58 +00:00
const DeepCollectionEquality ( )
2021-09-04 08:53:58 +00:00
. equals ( other . userProfile , userProfile ) ) ) ;
2021-06-19 15:41:19 +00:00
}
@ override
2021-07-12 15:27:58 +00:00
int get hashCode = >
2021-09-04 08:53:58 +00:00
runtimeType . hashCode ^ const DeepCollectionEquality ( ) . hash ( userProfile ) ;
2021-07-12 15:27:58 +00:00
@ JsonKey ( ignore: true )
@ override
$AuthenticatedCopyWith < Authenticated > get copyWith = >
_ $AuthenticatedCopyWithImpl < Authenticated > ( this , _ $identity ) ;
2021-06-19 15:41:19 +00:00
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-09-04 08:53:58 +00:00
required TResult Function ( UserProfile userProfile ) authenticated ,
2021-07-12 15:27:58 +00:00
required TResult Function ( UserError error ) unauthenticated ,
required TResult Function ( ) initial ,
2021-06-19 15:41:19 +00:00
} ) {
2021-09-04 08:53:58 +00:00
return authenticated ( userProfile ) ;
2021-06-19 15:41:19 +00:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-09-04 08:53:58 +00:00
TResult Function ( UserProfile userProfile ) ? authenticated ,
2021-07-12 15:27:58 +00:00
TResult Function ( UserError error ) ? unauthenticated ,
TResult Function ( ) ? initial ,
2021-06-19 15:41:19 +00:00
required TResult orElse ( ) ,
} ) {
if ( authenticated ! = null ) {
2021-09-04 08:53:58 +00:00
return authenticated ( userProfile ) ;
2021-06-19 15:41:19 +00:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( Authenticated value ) authenticated ,
required TResult Function ( Unauthenticated value ) unauthenticated ,
2021-07-12 15:27:58 +00:00
required TResult Function ( _Initial value ) initial ,
2021-06-19 15:41:19 +00:00
} ) {
return authenticated ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Authenticated value ) ? authenticated ,
TResult Function ( Unauthenticated value ) ? unauthenticated ,
2021-07-12 15:27:58 +00:00
TResult Function ( _Initial value ) ? initial ,
2021-06-19 15:41:19 +00:00
required TResult orElse ( ) ,
} ) {
if ( authenticated ! = null ) {
return authenticated ( this ) ;
}
return orElse ( ) ;
}
}
abstract class Authenticated implements AuthState {
2021-09-04 08:53:58 +00:00
const factory Authenticated ( UserProfile userProfile ) = _ $Authenticated ;
2021-07-12 15:27:58 +00:00
2021-09-04 08:53:58 +00:00
UserProfile get userProfile = > throw _privateConstructorUsedError ;
2021-07-12 15:27:58 +00:00
@ JsonKey ( ignore: true )
$AuthenticatedCopyWith < Authenticated > get copyWith = >
throw _privateConstructorUsedError ;
2021-06-19 15:41:19 +00:00
}
/// @nodoc
abstract class $UnauthenticatedCopyWith < $Res > {
factory $UnauthenticatedCopyWith (
Unauthenticated value , $Res Function ( Unauthenticated ) then ) =
_ $UnauthenticatedCopyWithImpl < $Res > ;
2021-07-12 15:27:58 +00:00
$Res call ( { UserError error } ) ;
2021-06-19 15:41:19 +00:00
}
/// @nodoc
class _ $UnauthenticatedCopyWithImpl < $Res > extends _ $AuthStateCopyWithImpl < $Res >
implements $UnauthenticatedCopyWith < $Res > {
_ $UnauthenticatedCopyWithImpl (
Unauthenticated _value , $Res Function ( Unauthenticated ) _then )
: super ( _value , ( v ) = > _then ( v as Unauthenticated ) ) ;
@ override
Unauthenticated get _value = > super . _value as Unauthenticated ;
2021-07-12 15:27:58 +00:00
@ override
$Res call ( {
Object ? error = freezed ,
} ) {
return _then ( Unauthenticated (
error = = freezed
? _value . error
: error // ignore: cast_nullable_to_non_nullable
as UserError ,
) ) ;
}
2021-06-19 15:41:19 +00:00
}
/// @nodoc
class _ $Unauthenticated implements Unauthenticated {
2021-07-12 15:27:58 +00:00
const _ $Unauthenticated ( this . error ) ;
@ override
final UserError error ;
2021-06-19 15:41:19 +00:00
@ override
String toString ( ) {
2021-07-12 15:27:58 +00:00
return ' AuthState.unauthenticated(error: $ error ) ' ;
2021-06-19 15:41:19 +00:00
}
@ override
bool operator = = ( dynamic other ) {
2021-07-12 15:27:58 +00:00
return identical ( this , other ) | |
( other is Unauthenticated & &
( identical ( other . error , error ) | |
const DeepCollectionEquality ( ) . equals ( other . error , error ) ) ) ;
2021-06-19 15:41:19 +00:00
}
@ override
2021-07-12 15:27:58 +00:00
int get hashCode = >
runtimeType . hashCode ^ const DeepCollectionEquality ( ) . hash ( error ) ;
@ JsonKey ( ignore: true )
@ override
$UnauthenticatedCopyWith < Unauthenticated > get copyWith = >
_ $UnauthenticatedCopyWithImpl < Unauthenticated > ( this , _ $identity ) ;
2021-06-19 15:41:19 +00:00
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-09-04 08:53:58 +00:00
required TResult Function ( UserProfile userProfile ) authenticated ,
2021-07-12 15:27:58 +00:00
required TResult Function ( UserError error ) unauthenticated ,
required TResult Function ( ) initial ,
2021-06-19 15:41:19 +00:00
} ) {
2021-07-12 15:27:58 +00:00
return unauthenticated ( error ) ;
2021-06-19 15:41:19 +00:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-09-04 08:53:58 +00:00
TResult Function ( UserProfile userProfile ) ? authenticated ,
2021-07-12 15:27:58 +00:00
TResult Function ( UserError error ) ? unauthenticated ,
TResult Function ( ) ? initial ,
2021-06-19 15:41:19 +00:00
required TResult orElse ( ) ,
} ) {
if ( unauthenticated ! = null ) {
2021-07-12 15:27:58 +00:00
return unauthenticated ( error ) ;
2021-06-19 15:41:19 +00:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( Authenticated value ) authenticated ,
required TResult Function ( Unauthenticated value ) unauthenticated ,
2021-07-12 15:27:58 +00:00
required TResult Function ( _Initial value ) initial ,
2021-06-19 15:41:19 +00:00
} ) {
return unauthenticated ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Authenticated value ) ? authenticated ,
TResult Function ( Unauthenticated value ) ? unauthenticated ,
2021-07-12 15:27:58 +00:00
TResult Function ( _Initial value ) ? initial ,
2021-06-19 15:41:19 +00:00
required TResult orElse ( ) ,
} ) {
if ( unauthenticated ! = null ) {
return unauthenticated ( this ) ;
}
return orElse ( ) ;
}
}
abstract class Unauthenticated implements AuthState {
2021-07-12 15:27:58 +00:00
const factory Unauthenticated ( UserError error ) = _ $Unauthenticated ;
UserError get error = > throw _privateConstructorUsedError ;
@ JsonKey ( ignore: true )
$UnauthenticatedCopyWith < Unauthenticated > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class _ $InitialCopyWith < $Res > {
factory _ $InitialCopyWith ( _Initial value , $Res Function ( _Initial ) then ) =
__ $InitialCopyWithImpl < $Res > ;
}
/// @nodoc
class __ $InitialCopyWithImpl < $Res > extends _ $AuthStateCopyWithImpl < $Res >
implements _ $InitialCopyWith < $Res > {
__ $InitialCopyWithImpl ( _Initial _value , $Res Function ( _Initial ) _then )
: super ( _value , ( v ) = > _then ( v as _Initial ) ) ;
@ override
_Initial get _value = > super . _value as _Initial ;
}
/// @nodoc
class _ $_Initial implements _Initial {
const _ $_Initial ( ) ;
@ override
String toString ( ) {
return ' AuthState.initial() ' ;
}
@ override
bool operator = = ( dynamic other ) {
return identical ( this , other ) | | ( other is _Initial ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-09-04 08:53:58 +00:00
required TResult Function ( UserProfile userProfile ) authenticated ,
2021-07-12 15:27:58 +00:00
required TResult Function ( UserError error ) unauthenticated ,
required TResult Function ( ) initial ,
} ) {
return initial ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-09-04 08:53:58 +00:00
TResult Function ( UserProfile userProfile ) ? authenticated ,
2021-07-12 15:27:58 +00:00
TResult Function ( UserError error ) ? unauthenticated ,
TResult Function ( ) ? initial ,
required TResult orElse ( ) ,
} ) {
if ( initial ! = null ) {
return initial ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( Authenticated value ) authenticated ,
required TResult Function ( Unauthenticated value ) unauthenticated ,
required TResult Function ( _Initial value ) initial ,
} ) {
return initial ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Authenticated value ) ? authenticated ,
TResult Function ( Unauthenticated value ) ? unauthenticated ,
TResult Function ( _Initial value ) ? initial ,
required TResult orElse ( ) ,
} ) {
if ( initial ! = null ) {
return initial ( this ) ;
}
return orElse ( ) ;
}
}
abstract class _Initial implements AuthState {
const factory _Initial ( ) = _ $_Initial ;
2021-06-19 15:41:19 +00:00
}