AGENTS.md 与 README.md 同步更新:根据实际代码结构重写目录树、技术栈、架构分层及编码规范,移除旧版内联示例并补充新的开发约定与代码生成命令。
215 lines
6.7 KiB
Dart
215 lines
6.7 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 {
|
|
bool get loggedIn => throw _privateConstructorUsedError;
|
|
bool get restoring => throw _privateConstructorUsedError;
|
|
String? get username => throw _privateConstructorUsedError;
|
|
String? get error => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$AuthStateCopyWith<AuthState> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $AuthStateCopyWith<$Res> {
|
|
factory $AuthStateCopyWith(AuthState value, $Res Function(AuthState) then) =
|
|
_$AuthStateCopyWithImpl<$Res, AuthState>;
|
|
@useResult
|
|
$Res call({bool loggedIn, bool restoring, String? username, String? error});
|
|
}
|
|
|
|
/// @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.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? loggedIn = null,
|
|
Object? restoring = null,
|
|
Object? username = freezed,
|
|
Object? error = freezed,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
loggedIn: null == loggedIn
|
|
? _value.loggedIn
|
|
: loggedIn // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
restoring: null == restoring
|
|
? _value.restoring
|
|
: restoring // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
username: freezed == username
|
|
? _value.username
|
|
: username // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
error: freezed == error
|
|
? _value.error
|
|
: error // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$AuthStateImplCopyWith<$Res>
|
|
implements $AuthStateCopyWith<$Res> {
|
|
factory _$$AuthStateImplCopyWith(
|
|
_$AuthStateImpl value,
|
|
$Res Function(_$AuthStateImpl) then,
|
|
) = __$$AuthStateImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({bool loggedIn, bool restoring, String? username, String? error});
|
|
}
|
|
|
|
/// @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.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? loggedIn = null,
|
|
Object? restoring = null,
|
|
Object? username = freezed,
|
|
Object? error = freezed,
|
|
}) {
|
|
return _then(
|
|
_$AuthStateImpl(
|
|
loggedIn: null == loggedIn
|
|
? _value.loggedIn
|
|
: loggedIn // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
restoring: null == restoring
|
|
? _value.restoring
|
|
: restoring // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
username: freezed == username
|
|
? _value.username
|
|
: username // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
error: freezed == error
|
|
? _value.error
|
|
: error // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$AuthStateImpl implements _AuthState {
|
|
const _$AuthStateImpl({
|
|
this.loggedIn = false,
|
|
this.restoring = false,
|
|
this.username,
|
|
this.error,
|
|
});
|
|
|
|
@override
|
|
@JsonKey()
|
|
final bool loggedIn;
|
|
@override
|
|
@JsonKey()
|
|
final bool restoring;
|
|
@override
|
|
final String? username;
|
|
@override
|
|
final String? error;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'AuthState(loggedIn: $loggedIn, restoring: $restoring, username: $username, error: $error)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$AuthStateImpl &&
|
|
(identical(other.loggedIn, loggedIn) ||
|
|
other.loggedIn == loggedIn) &&
|
|
(identical(other.restoring, restoring) ||
|
|
other.restoring == restoring) &&
|
|
(identical(other.username, username) ||
|
|
other.username == username) &&
|
|
(identical(other.error, error) || other.error == error));
|
|
}
|
|
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(runtimeType, loggedIn, restoring, username, error);
|
|
|
|
/// 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')
|
|
_$$AuthStateImplCopyWith<_$AuthStateImpl> get copyWith =>
|
|
__$$AuthStateImplCopyWithImpl<_$AuthStateImpl>(this, _$identity);
|
|
}
|
|
|
|
abstract class _AuthState implements AuthState {
|
|
const factory _AuthState({
|
|
final bool loggedIn,
|
|
final bool restoring,
|
|
final String? username,
|
|
final String? error,
|
|
}) = _$AuthStateImpl;
|
|
|
|
@override
|
|
bool get loggedIn;
|
|
@override
|
|
bool get restoring;
|
|
@override
|
|
String? get username;
|
|
@override
|
|
String? get error;
|
|
|
|
/// Create a copy of AuthState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$AuthStateImplCopyWith<_$AuthStateImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|