@@ -12,7 +12,7 @@ part of 'user.dart';
12
12
T _$identity <T >(T value) => value;
13
13
14
14
final _privateConstructorUsedError = UnsupportedError (
15
- '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.\n Please check the documentation here for more information: https://github.com/rrousselGit/freezed#custom -getters-and-methods' );
15
+ '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.\n Please check the documentation here for more information: https://github.com/rrousselGit/freezed#adding -getters-and-methods-to-our-models ' );
16
16
17
17
User _$UserFromJson (Map <String , dynamic > json) {
18
18
return _User .fromJson (json);
@@ -23,8 +23,12 @@ mixin _$User {
23
23
String ? get username => throw _privateConstructorUsedError;
24
24
String ? get password => throw _privateConstructorUsedError;
25
25
26
+ /// Serializes this User to a JSON map.
26
27
Map <String , dynamic > toJson () => throw _privateConstructorUsedError;
27
- @JsonKey (ignore: true )
28
+
29
+ /// Create a copy of User
30
+ /// with the given fields replaced by the non-null parameter values.
31
+ @JsonKey (includeFromJson: false , includeToJson: false )
28
32
$UserCopyWith <User > get copyWith => throw _privateConstructorUsedError;
29
33
}
30
34
@@ -46,6 +50,8 @@ class _$UserCopyWithImpl<$Res, $Val extends User>
46
50
// ignore: unused_field
47
51
final $Res Function ($Val ) _then;
48
52
53
+ /// Create a copy of User
54
+ /// with the given fields replaced by the non-null parameter values.
49
55
@pragma ('vm:prefer-inline' )
50
56
@override
51
57
$Res call ({
@@ -66,27 +72,31 @@ class _$UserCopyWithImpl<$Res, $Val extends User>
66
72
}
67
73
68
74
/// @nodoc
69
- abstract class _$$_UserCopyWith <$Res > implements $UserCopyWith <$Res > {
70
- factory _$$_UserCopyWith (_$_User value, $Res Function (_$_User ) then) =
71
- __$$_UserCopyWithImpl <$Res >;
75
+ abstract class _$$UserImplCopyWith <$Res > implements $UserCopyWith <$Res > {
76
+ factory _$$UserImplCopyWith (
77
+ _$UserImpl value, $Res Function (_$UserImpl ) then) =
78
+ __$$UserImplCopyWithImpl <$Res >;
72
79
@override
73
80
@useResult
74
81
$Res call ({String ? username, String ? password});
75
82
}
76
83
77
84
/// @nodoc
78
- class __$$_UserCopyWithImpl <$Res > extends _$UserCopyWithImpl <$Res , _$_User >
79
- implements _$$_UserCopyWith <$Res > {
80
- __$$_UserCopyWithImpl (_$_User _value, $Res Function (_$_User ) _then)
85
+ class __$$UserImplCopyWithImpl <$Res >
86
+ extends _$UserCopyWithImpl <$Res , _$UserImpl >
87
+ implements _$$UserImplCopyWith <$Res > {
88
+ __$$UserImplCopyWithImpl (_$UserImpl _value, $Res Function (_$UserImpl ) _then)
81
89
: super (_value, _then);
82
90
91
+ /// Create a copy of User
92
+ /// with the given fields replaced by the non-null parameter values.
83
93
@pragma ('vm:prefer-inline' )
84
94
@override
85
95
$Res call ({
86
96
Object ? username = freezed,
87
97
Object ? password = freezed,
88
98
}) {
89
- return _then (_$_User (
99
+ return _then (_$UserImpl (
90
100
username: freezed == username
91
101
? _value.username
92
102
: username // ignore: cast_nullable_to_non_nullable
@@ -101,10 +111,11 @@ class __$$_UserCopyWithImpl<$Res> extends _$UserCopyWithImpl<$Res, _$_User>
101
111
102
112
/// @nodoc
103
113
@JsonSerializable ()
104
- class _$_User implements _User {
105
- const _$_User ({this .username, this .password});
114
+ class _$UserImpl implements _User {
115
+ const _$UserImpl ({this .username, this .password});
106
116
107
- factory _$_User .fromJson (Map <String , dynamic > json) => _$$_UserFromJson (json);
117
+ factory _$UserImpl .fromJson (Map <String , dynamic > json) =>
118
+ _$$UserImplFromJson (json);
108
119
109
120
@override
110
121
final String ? username;
@@ -117,45 +128,51 @@ class _$_User implements _User {
117
128
}
118
129
119
130
@override
120
- bool operator == (dynamic other) {
131
+ bool operator == (Object other) {
121
132
return identical (this , other) ||
122
133
(other.runtimeType == runtimeType &&
123
- other is _$_User &&
134
+ other is _$UserImpl &&
124
135
(identical (other.username, username) ||
125
136
other.username == username) &&
126
137
(identical (other.password, password) ||
127
138
other.password == password));
128
139
}
129
140
130
- @JsonKey (ignore : true )
141
+ @JsonKey (includeFromJson : false , includeToJson : false )
131
142
@override
132
143
int get hashCode => Object .hash (runtimeType, username, password);
133
144
134
- @JsonKey (ignore: true )
145
+ /// Create a copy of User
146
+ /// with the given fields replaced by the non-null parameter values.
147
+ @JsonKey (includeFromJson: false , includeToJson: false )
135
148
@override
136
149
@pragma ('vm:prefer-inline' )
137
- _$$_UserCopyWith <_$_User > get copyWith =>
138
- __$$_UserCopyWithImpl <_$_User >(this , _$identity);
150
+ _$$UserImplCopyWith <_$UserImpl > get copyWith =>
151
+ __$$UserImplCopyWithImpl <_$UserImpl >(this , _$identity);
139
152
140
153
@override
141
154
Map <String , dynamic > toJson () {
142
- return _$$_UserToJson (
155
+ return _$$UserImplToJson (
143
156
this ,
144
157
);
145
158
}
146
159
}
147
160
148
161
abstract class _User implements User {
149
162
const factory _User ({final String ? username, final String ? password}) =
150
- _$_User ;
163
+ _$UserImpl ;
151
164
152
- factory _User .fromJson (Map <String , dynamic > json) = _$_User .fromJson;
165
+ factory _User .fromJson (Map <String , dynamic > json) = _$UserImpl .fromJson;
153
166
154
167
@override
155
168
String ? get username;
156
169
@override
157
170
String ? get password;
171
+
172
+ /// Create a copy of User
173
+ /// with the given fields replaced by the non-null parameter values.
158
174
@override
159
- @JsonKey (ignore: true )
160
- _$$_UserCopyWith <_$_User > get copyWith => throw _privateConstructorUsedError;
175
+ @JsonKey (includeFromJson: false , includeToJson: false )
176
+ _$$UserImplCopyWith <_$UserImpl > get copyWith =>
177
+ throw _privateConstructorUsedError;
161
178
}
0 commit comments