Files

238 lines
7.0 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 '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#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$User {
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String? get avatarUrl => throw _privateConstructorUsedError;
String? get role => throw _privateConstructorUsedError; // 'admin', 'member'
bool? get isOnline => throw _privateConstructorUsedError;
DateTime? get lastSeen => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$UserCopyWith<User> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $UserCopyWith<$Res> {
factory $UserCopyWith(User value, $Res Function(User) then) =
_$UserCopyWithImpl<$Res, User>;
@useResult
$Res call(
{String id,
String name,
String? avatarUrl,
String? role,
bool? isOnline,
DateTime? lastSeen});
}
/// @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;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? avatarUrl = freezed,
Object? role = freezed,
Object? isOnline = freezed,
Object? lastSeen = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
avatarUrl: freezed == avatarUrl
? _value.avatarUrl
: avatarUrl // ignore: cast_nullable_to_non_nullable
as String?,
role: freezed == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String?,
isOnline: freezed == isOnline
? _value.isOnline
: isOnline // ignore: cast_nullable_to_non_nullable
as bool?,
lastSeen: freezed == lastSeen
? _value.lastSeen
: lastSeen // ignore: cast_nullable_to_non_nullable
as DateTime?,
) as $Val);
}
}
/// @nodoc
abstract class _$$UserImplCopyWith<$Res> implements $UserCopyWith<$Res> {
factory _$$UserImplCopyWith(
_$UserImpl value, $Res Function(_$UserImpl) then) =
__$$UserImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String id,
String name,
String? avatarUrl,
String? role,
bool? isOnline,
DateTime? lastSeen});
}
/// @nodoc
class __$$UserImplCopyWithImpl<$Res>
extends _$UserCopyWithImpl<$Res, _$UserImpl>
implements _$$UserImplCopyWith<$Res> {
__$$UserImplCopyWithImpl(_$UserImpl _value, $Res Function(_$UserImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? avatarUrl = freezed,
Object? role = freezed,
Object? isOnline = freezed,
Object? lastSeen = freezed,
}) {
return _then(_$UserImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
avatarUrl: freezed == avatarUrl
? _value.avatarUrl
: avatarUrl // ignore: cast_nullable_to_non_nullable
as String?,
role: freezed == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String?,
isOnline: freezed == isOnline
? _value.isOnline
: isOnline // ignore: cast_nullable_to_non_nullable
as bool?,
lastSeen: freezed == lastSeen
? _value.lastSeen
: lastSeen // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
/// @nodoc
class _$UserImpl implements _User {
const _$UserImpl(
{required this.id,
required this.name,
this.avatarUrl,
this.role,
this.isOnline,
this.lastSeen});
@override
final String id;
@override
final String name;
@override
final String? avatarUrl;
@override
final String? role;
// 'admin', 'member'
@override
final bool? isOnline;
@override
final DateTime? lastSeen;
@override
String toString() {
return 'User(id: $id, name: $name, avatarUrl: $avatarUrl, role: $role, isOnline: $isOnline, lastSeen: $lastSeen)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$UserImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.avatarUrl, avatarUrl) ||
other.avatarUrl == avatarUrl) &&
(identical(other.role, role) || other.role == role) &&
(identical(other.isOnline, isOnline) ||
other.isOnline == isOnline) &&
(identical(other.lastSeen, lastSeen) ||
other.lastSeen == lastSeen));
}
@override
int get hashCode =>
Object.hash(runtimeType, id, name, avatarUrl, role, isOnline, lastSeen);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$UserImplCopyWith<_$UserImpl> get copyWith =>
__$$UserImplCopyWithImpl<_$UserImpl>(this, _$identity);
}
abstract class _User implements User {
const factory _User(
{required final String id,
required final String name,
final String? avatarUrl,
final String? role,
final bool? isOnline,
final DateTime? lastSeen}) = _$UserImpl;
@override
String get id;
@override
String get name;
@override
String? get avatarUrl;
@override
String? get role;
@override // 'admin', 'member'
bool? get isOnline;
@override
DateTime? get lastSeen;
@override
@JsonKey(ignore: true)
_$$UserImplCopyWith<_$UserImpl> get copyWith =>
throw _privateConstructorUsedError;
}