forked from eatvio/eatvio_app
633 lines
18 KiB
Dart
633 lines
18 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// 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_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.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
|
|
|
/// @nodoc
|
|
mixin _$AuthState {
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function() loading,
|
|
required TResult Function(String token) loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function()? loading,
|
|
TResult? Function(String token)? loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function()? loading,
|
|
TResult Function(String token)? loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_AuthState value) $default, {
|
|
required TResult Function(AuthStateLoading value) loading,
|
|
required TResult Function(AuthStateLoaded value) loaded,
|
|
required TResult Function(AuthStateError value) error,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_AuthState value)? $default, {
|
|
TResult? Function(AuthStateLoading value)? loading,
|
|
TResult? Function(AuthStateLoaded value)? loaded,
|
|
TResult? Function(AuthStateError value)? error,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_AuthState value)? $default, {
|
|
TResult Function(AuthStateLoading value)? loading,
|
|
TResult Function(AuthStateLoaded value)? loaded,
|
|
TResult Function(AuthStateError value)? error,
|
|
required TResult orElse(),
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $AuthStateCopyWith<$Res> {
|
|
factory $AuthStateCopyWith(AuthState value, $Res Function(AuthState) then) =
|
|
_$AuthStateCopyWithImpl<$Res, AuthState>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$AuthStateCopyWithImpl<$Res, $Val extends AuthState>
|
|
implements $AuthStateCopyWith<$Res> {
|
|
_$AuthStateCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$AuthStateImplCopyWith<$Res> {
|
|
factory _$$AuthStateImplCopyWith(
|
|
_$AuthStateImpl value, $Res Function(_$AuthStateImpl) then) =
|
|
__$$AuthStateImplCopyWithImpl<$Res>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$AuthStateImplCopyWithImpl<$Res>
|
|
extends _$AuthStateCopyWithImpl<$Res, _$AuthStateImpl>
|
|
implements _$$AuthStateImplCopyWith<$Res> {
|
|
__$$AuthStateImplCopyWithImpl(
|
|
_$AuthStateImpl _value, $Res Function(_$AuthStateImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$AuthStateImpl implements _AuthState {
|
|
const _$AuthStateImpl();
|
|
|
|
@override
|
|
String toString() {
|
|
return 'AuthState()';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType && other is _$AuthStateImpl);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function() loading,
|
|
required TResult Function(String token) loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) {
|
|
return $default();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function()? loading,
|
|
TResult? Function(String token)? loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) {
|
|
return $default?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function()? loading,
|
|
TResult Function(String token)? loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if ($default != null) {
|
|
return $default();
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_AuthState value) $default, {
|
|
required TResult Function(AuthStateLoading value) loading,
|
|
required TResult Function(AuthStateLoaded value) loaded,
|
|
required TResult Function(AuthStateError value) error,
|
|
}) {
|
|
return $default(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_AuthState value)? $default, {
|
|
TResult? Function(AuthStateLoading value)? loading,
|
|
TResult? Function(AuthStateLoaded value)? loaded,
|
|
TResult? Function(AuthStateError value)? error,
|
|
}) {
|
|
return $default?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_AuthState value)? $default, {
|
|
TResult Function(AuthStateLoading value)? loading,
|
|
TResult Function(AuthStateLoaded value)? loaded,
|
|
TResult Function(AuthStateError value)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if ($default != null) {
|
|
return $default(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class _AuthState implements AuthState {
|
|
const factory _AuthState() = _$AuthStateImpl;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$AuthStateLoadingImplCopyWith<$Res> {
|
|
factory _$$AuthStateLoadingImplCopyWith(_$AuthStateLoadingImpl value,
|
|
$Res Function(_$AuthStateLoadingImpl) then) =
|
|
__$$AuthStateLoadingImplCopyWithImpl<$Res>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$AuthStateLoadingImplCopyWithImpl<$Res>
|
|
extends _$AuthStateCopyWithImpl<$Res, _$AuthStateLoadingImpl>
|
|
implements _$$AuthStateLoadingImplCopyWith<$Res> {
|
|
__$$AuthStateLoadingImplCopyWithImpl(_$AuthStateLoadingImpl _value,
|
|
$Res Function(_$AuthStateLoadingImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$AuthStateLoadingImpl implements AuthStateLoading {
|
|
const _$AuthStateLoadingImpl();
|
|
|
|
@override
|
|
String toString() {
|
|
return 'AuthState.loading()';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType && other is _$AuthStateLoadingImpl);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function() loading,
|
|
required TResult Function(String token) loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) {
|
|
return loading();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function()? loading,
|
|
TResult? Function(String token)? loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) {
|
|
return loading?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function()? loading,
|
|
TResult Function(String token)? loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (loading != null) {
|
|
return loading();
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_AuthState value) $default, {
|
|
required TResult Function(AuthStateLoading value) loading,
|
|
required TResult Function(AuthStateLoaded value) loaded,
|
|
required TResult Function(AuthStateError value) error,
|
|
}) {
|
|
return loading(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_AuthState value)? $default, {
|
|
TResult? Function(AuthStateLoading value)? loading,
|
|
TResult? Function(AuthStateLoaded value)? loaded,
|
|
TResult? Function(AuthStateError value)? error,
|
|
}) {
|
|
return loading?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_AuthState value)? $default, {
|
|
TResult Function(AuthStateLoading value)? loading,
|
|
TResult Function(AuthStateLoaded value)? loaded,
|
|
TResult Function(AuthStateError value)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (loading != null) {
|
|
return loading(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class AuthStateLoading implements AuthState {
|
|
const factory AuthStateLoading() = _$AuthStateLoadingImpl;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$AuthStateLoadedImplCopyWith<$Res> {
|
|
factory _$$AuthStateLoadedImplCopyWith(_$AuthStateLoadedImpl value,
|
|
$Res Function(_$AuthStateLoadedImpl) then) =
|
|
__$$AuthStateLoadedImplCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call({String token});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$AuthStateLoadedImplCopyWithImpl<$Res>
|
|
extends _$AuthStateCopyWithImpl<$Res, _$AuthStateLoadedImpl>
|
|
implements _$$AuthStateLoadedImplCopyWith<$Res> {
|
|
__$$AuthStateLoadedImplCopyWithImpl(
|
|
_$AuthStateLoadedImpl _value, $Res Function(_$AuthStateLoadedImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? token = null,
|
|
}) {
|
|
return _then(_$AuthStateLoadedImpl(
|
|
token: null == token
|
|
? _value.token
|
|
: token // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$AuthStateLoadedImpl implements AuthStateLoaded {
|
|
const _$AuthStateLoadedImpl({required this.token});
|
|
|
|
@override
|
|
final String token;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'AuthState.loaded(token: $token)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$AuthStateLoadedImpl &&
|
|
(identical(other.token, token) || other.token == token));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, token);
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$AuthStateLoadedImplCopyWith<_$AuthStateLoadedImpl> get copyWith =>
|
|
__$$AuthStateLoadedImplCopyWithImpl<_$AuthStateLoadedImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function() loading,
|
|
required TResult Function(String token) loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) {
|
|
return loaded(token);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function()? loading,
|
|
TResult? Function(String token)? loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) {
|
|
return loaded?.call(token);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function()? loading,
|
|
TResult Function(String token)? loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (loaded != null) {
|
|
return loaded(token);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_AuthState value) $default, {
|
|
required TResult Function(AuthStateLoading value) loading,
|
|
required TResult Function(AuthStateLoaded value) loaded,
|
|
required TResult Function(AuthStateError value) error,
|
|
}) {
|
|
return loaded(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_AuthState value)? $default, {
|
|
TResult? Function(AuthStateLoading value)? loading,
|
|
TResult? Function(AuthStateLoaded value)? loaded,
|
|
TResult? Function(AuthStateError value)? error,
|
|
}) {
|
|
return loaded?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_AuthState value)? $default, {
|
|
TResult Function(AuthStateLoading value)? loading,
|
|
TResult Function(AuthStateLoaded value)? loaded,
|
|
TResult Function(AuthStateError value)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (loaded != null) {
|
|
return loaded(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class AuthStateLoaded implements AuthState {
|
|
const factory AuthStateLoaded({required final String token}) =
|
|
_$AuthStateLoadedImpl;
|
|
|
|
String get token;
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$AuthStateLoadedImplCopyWith<_$AuthStateLoadedImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$AuthStateErrorImplCopyWith<$Res> {
|
|
factory _$$AuthStateErrorImplCopyWith(_$AuthStateErrorImpl value,
|
|
$Res Function(_$AuthStateErrorImpl) then) =
|
|
__$$AuthStateErrorImplCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call({String errorMessage});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$AuthStateErrorImplCopyWithImpl<$Res>
|
|
extends _$AuthStateCopyWithImpl<$Res, _$AuthStateErrorImpl>
|
|
implements _$$AuthStateErrorImplCopyWith<$Res> {
|
|
__$$AuthStateErrorImplCopyWithImpl(
|
|
_$AuthStateErrorImpl _value, $Res Function(_$AuthStateErrorImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? errorMessage = null,
|
|
}) {
|
|
return _then(_$AuthStateErrorImpl(
|
|
errorMessage: null == errorMessage
|
|
? _value.errorMessage
|
|
: errorMessage // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$AuthStateErrorImpl implements AuthStateError {
|
|
const _$AuthStateErrorImpl({required this.errorMessage});
|
|
|
|
@override
|
|
final String errorMessage;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'AuthState.error(errorMessage: $errorMessage)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$AuthStateErrorImpl &&
|
|
(identical(other.errorMessage, errorMessage) ||
|
|
other.errorMessage == errorMessage));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$AuthStateErrorImplCopyWith<_$AuthStateErrorImpl> get copyWith =>
|
|
__$$AuthStateErrorImplCopyWithImpl<_$AuthStateErrorImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function() loading,
|
|
required TResult Function(String token) loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) {
|
|
return error(errorMessage);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function()? loading,
|
|
TResult? Function(String token)? loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) {
|
|
return error?.call(errorMessage);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function()? loading,
|
|
TResult Function(String token)? loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (error != null) {
|
|
return error(errorMessage);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_AuthState value) $default, {
|
|
required TResult Function(AuthStateLoading value) loading,
|
|
required TResult Function(AuthStateLoaded value) loaded,
|
|
required TResult Function(AuthStateError value) error,
|
|
}) {
|
|
return error(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_AuthState value)? $default, {
|
|
TResult? Function(AuthStateLoading value)? loading,
|
|
TResult? Function(AuthStateLoaded value)? loaded,
|
|
TResult? Function(AuthStateError value)? error,
|
|
}) {
|
|
return error?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_AuthState value)? $default, {
|
|
TResult Function(AuthStateLoading value)? loading,
|
|
TResult Function(AuthStateLoaded value)? loaded,
|
|
TResult Function(AuthStateError value)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (error != null) {
|
|
return error(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class AuthStateError implements AuthState {
|
|
const factory AuthStateError({required final String errorMessage}) =
|
|
_$AuthStateErrorImpl;
|
|
|
|
String get errorMessage;
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$AuthStateErrorImplCopyWith<_$AuthStateErrorImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|