mirror of
https://github.com/lucavenir/go_router_riverpod.git
synced 2025-05-19 21:26:31 +08:00
357 lines
9.8 KiB
Dart
357 lines
9.8 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
|
|
|
|
part of 'user.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#custom-getters-and-methods');
|
|
|
|
/// @nodoc
|
|
mixin _$User {
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function(
|
|
int id, String displayName, String email, String token)
|
|
signedIn,
|
|
required TResult Function() signedOut,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function(int id, String displayName, String email, String token)?
|
|
signedIn,
|
|
TResult? Function()? signedOut,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function(int id, String displayName, String email, String token)?
|
|
signedIn,
|
|
TResult Function()? signedOut,
|
|
required TResult orElse(),
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(SignedIn value) signedIn,
|
|
required TResult Function(SignedOut value) signedOut,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(SignedIn value)? signedIn,
|
|
TResult? Function(SignedOut value)? signedOut,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(SignedIn value)? signedIn,
|
|
TResult Function(SignedOut value)? signedOut,
|
|
required TResult orElse(),
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $UserCopyWith<$Res> {
|
|
factory $UserCopyWith(User value, $Res Function(User) then) =
|
|
_$UserCopyWithImpl<$Res, User>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$UserCopyWithImpl<$Res, $Val extends User>
|
|
implements $UserCopyWith<$Res> {
|
|
_$UserCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$SignedInCopyWith<$Res> {
|
|
factory _$$SignedInCopyWith(
|
|
_$SignedIn value, $Res Function(_$SignedIn) then) =
|
|
__$$SignedInCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call({int id, String displayName, String email, String token});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$SignedInCopyWithImpl<$Res>
|
|
extends _$UserCopyWithImpl<$Res, _$SignedIn>
|
|
implements _$$SignedInCopyWith<$Res> {
|
|
__$$SignedInCopyWithImpl(_$SignedIn _value, $Res Function(_$SignedIn) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? displayName = null,
|
|
Object? email = null,
|
|
Object? token = null,
|
|
}) {
|
|
return _then(_$SignedIn(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
displayName: null == displayName
|
|
? _value.displayName
|
|
: displayName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
email: null == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
token: null == token
|
|
? _value.token
|
|
: token // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$SignedIn implements SignedIn {
|
|
const _$SignedIn(
|
|
{required this.id,
|
|
required this.displayName,
|
|
required this.email,
|
|
required this.token});
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final String displayName;
|
|
@override
|
|
final String email;
|
|
@override
|
|
final String token;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'User.signedIn(id: $id, displayName: $displayName, email: $email, token: $token)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(dynamic other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$SignedIn &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.displayName, displayName) ||
|
|
other.displayName == displayName) &&
|
|
(identical(other.email, email) || other.email == email) &&
|
|
(identical(other.token, token) || other.token == token));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, displayName, email, token);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$SignedInCopyWith<_$SignedIn> get copyWith =>
|
|
__$$SignedInCopyWithImpl<_$SignedIn>(this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function(
|
|
int id, String displayName, String email, String token)
|
|
signedIn,
|
|
required TResult Function() signedOut,
|
|
}) {
|
|
return signedIn(id, displayName, email, token);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function(int id, String displayName, String email, String token)?
|
|
signedIn,
|
|
TResult? Function()? signedOut,
|
|
}) {
|
|
return signedIn?.call(id, displayName, email, token);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function(int id, String displayName, String email, String token)?
|
|
signedIn,
|
|
TResult Function()? signedOut,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (signedIn != null) {
|
|
return signedIn(id, displayName, email, token);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(SignedIn value) signedIn,
|
|
required TResult Function(SignedOut value) signedOut,
|
|
}) {
|
|
return signedIn(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(SignedIn value)? signedIn,
|
|
TResult? Function(SignedOut value)? signedOut,
|
|
}) {
|
|
return signedIn?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(SignedIn value)? signedIn,
|
|
TResult Function(SignedOut value)? signedOut,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (signedIn != null) {
|
|
return signedIn(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class SignedIn implements User {
|
|
const factory SignedIn(
|
|
{required final int id,
|
|
required final String displayName,
|
|
required final String email,
|
|
required final String token}) = _$SignedIn;
|
|
|
|
int get id;
|
|
String get displayName;
|
|
String get email;
|
|
String get token;
|
|
@JsonKey(ignore: true)
|
|
_$$SignedInCopyWith<_$SignedIn> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$SignedOutCopyWith<$Res> {
|
|
factory _$$SignedOutCopyWith(
|
|
_$SignedOut value, $Res Function(_$SignedOut) then) =
|
|
__$$SignedOutCopyWithImpl<$Res>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$SignedOutCopyWithImpl<$Res>
|
|
extends _$UserCopyWithImpl<$Res, _$SignedOut>
|
|
implements _$$SignedOutCopyWith<$Res> {
|
|
__$$SignedOutCopyWithImpl(
|
|
_$SignedOut _value, $Res Function(_$SignedOut) _then)
|
|
: super(_value, _then);
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$SignedOut implements SignedOut {
|
|
const _$SignedOut();
|
|
|
|
@override
|
|
String toString() {
|
|
return 'User.signedOut()';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(dynamic other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType && other is _$SignedOut);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function(
|
|
int id, String displayName, String email, String token)
|
|
signedIn,
|
|
required TResult Function() signedOut,
|
|
}) {
|
|
return signedOut();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function(int id, String displayName, String email, String token)?
|
|
signedIn,
|
|
TResult? Function()? signedOut,
|
|
}) {
|
|
return signedOut?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function(int id, String displayName, String email, String token)?
|
|
signedIn,
|
|
TResult Function()? signedOut,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (signedOut != null) {
|
|
return signedOut();
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(SignedIn value) signedIn,
|
|
required TResult Function(SignedOut value) signedOut,
|
|
}) {
|
|
return signedOut(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(SignedIn value)? signedIn,
|
|
TResult? Function(SignedOut value)? signedOut,
|
|
}) {
|
|
return signedOut?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(SignedIn value)? signedIn,
|
|
TResult Function(SignedOut value)? signedOut,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (signedOut != null) {
|
|
return signedOut(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class SignedOut implements User {
|
|
const factory SignedOut() = _$SignedOut;
|
|
}
|