generated from xmartlabs/flutter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.freezed.dart
316 lines (268 loc) · 8.89 KB
/
user.freezed.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
// 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#custom-getters-and-methods');
User _$UserFromJson(Map<String, dynamic> json) {
return _User.fromJson(json);
}
/// @nodoc
mixin _$User {
String get email => throw _privateConstructorUsedError;
String? get name => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => 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 email, String? name});
}
/// @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? email = null,
Object? name = freezed,
}) {
return _then(_value.copyWith(
email: null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$_UserCopyWith<$Res> implements $UserCopyWith<$Res> {
factory _$$_UserCopyWith(_$_User value, $Res Function(_$_User) then) =
__$$_UserCopyWithImpl<$Res>;
@override
@useResult
$Res call({String email, String? name});
}
/// @nodoc
class __$$_UserCopyWithImpl<$Res> extends _$UserCopyWithImpl<$Res, _$_User>
implements _$$_UserCopyWith<$Res> {
__$$_UserCopyWithImpl(_$_User _value, $Res Function(_$_User) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? email = null,
Object? name = freezed,
}) {
return _then(_$_User(
email: null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$_User implements _User {
_$_User({required this.email, this.name});
factory _$_User.fromJson(Map<String, dynamic> json) => _$$_UserFromJson(json);
@override
final String email;
@override
final String? name;
@override
String toString() {
return 'User(email: $email, name: $name)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_User &&
(identical(other.email, email) || other.email == email) &&
(identical(other.name, name) || other.name == name));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, email, name);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_UserCopyWith<_$_User> get copyWith =>
__$$_UserCopyWithImpl<_$_User>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_UserToJson(
this,
);
}
}
abstract class _User implements User {
factory _User({required final String email, final String? name}) = _$_User;
factory _User.fromJson(Map<String, dynamic> json) = _$_User.fromJson;
@override
String get email;
@override
String? get name;
@override
@JsonKey(ignore: true)
_$$_UserCopyWith<_$_User> get copyWith => throw _privateConstructorUsedError;
}
SupabaseUserResponse _$SupabaseUserResponseFromJson(Map<String, dynamic> json) {
return _SupabaseUserResponse.fromJson(json);
}
/// @nodoc
mixin _$SupabaseUserResponse {
String get id => throw _privateConstructorUsedError;
String get alias => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$SupabaseUserResponseCopyWith<SupabaseUserResponse> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SupabaseUserResponseCopyWith<$Res> {
factory $SupabaseUserResponseCopyWith(SupabaseUserResponse value,
$Res Function(SupabaseUserResponse) then) =
_$SupabaseUserResponseCopyWithImpl<$Res, SupabaseUserResponse>;
@useResult
$Res call({String id, String alias});
}
/// @nodoc
class _$SupabaseUserResponseCopyWithImpl<$Res,
$Val extends SupabaseUserResponse>
implements $SupabaseUserResponseCopyWith<$Res> {
_$SupabaseUserResponseCopyWithImpl(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? alias = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
alias: null == alias
? _value.alias
: alias // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
/// @nodoc
abstract class _$$_SupabaseUserResponseCopyWith<$Res>
implements $SupabaseUserResponseCopyWith<$Res> {
factory _$$_SupabaseUserResponseCopyWith(_$_SupabaseUserResponse value,
$Res Function(_$_SupabaseUserResponse) then) =
__$$_SupabaseUserResponseCopyWithImpl<$Res>;
@override
@useResult
$Res call({String id, String alias});
}
/// @nodoc
class __$$_SupabaseUserResponseCopyWithImpl<$Res>
extends _$SupabaseUserResponseCopyWithImpl<$Res, _$_SupabaseUserResponse>
implements _$$_SupabaseUserResponseCopyWith<$Res> {
__$$_SupabaseUserResponseCopyWithImpl(_$_SupabaseUserResponse _value,
$Res Function(_$_SupabaseUserResponse) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? alias = null,
}) {
return _then(_$_SupabaseUserResponse(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
alias: null == alias
? _value.alias
: alias // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
@JsonSerializable()
class _$_SupabaseUserResponse implements _SupabaseUserResponse {
_$_SupabaseUserResponse({required this.id, required this.alias});
factory _$_SupabaseUserResponse.fromJson(Map<String, dynamic> json) =>
_$$_SupabaseUserResponseFromJson(json);
@override
final String id;
@override
final String alias;
@override
String toString() {
return 'SupabaseUserResponse(id: $id, alias: $alias)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_SupabaseUserResponse &&
(identical(other.id, id) || other.id == id) &&
(identical(other.alias, alias) || other.alias == alias));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, alias);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_SupabaseUserResponseCopyWith<_$_SupabaseUserResponse> get copyWith =>
__$$_SupabaseUserResponseCopyWithImpl<_$_SupabaseUserResponse>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_SupabaseUserResponseToJson(
this,
);
}
}
abstract class _SupabaseUserResponse implements SupabaseUserResponse {
factory _SupabaseUserResponse(
{required final String id,
required final String alias}) = _$_SupabaseUserResponse;
factory _SupabaseUserResponse.fromJson(Map<String, dynamic> json) =
_$_SupabaseUserResponse.fromJson;
@override
String get id;
@override
String get alias;
@override
@JsonKey(ignore: true)
_$$_SupabaseUserResponseCopyWith<_$_SupabaseUserResponse> get copyWith =>
throw _privateConstructorUsedError;
}