@@ -202,19 +202,24 @@ class ListGameServerMapper extends ClassMapperBase<ListGameServer> {
202
202
static bool _$secure (ListGameServer v) => v.secure;
203
203
static const Field <ListGameServer , bool > _f$secure =
204
204
Field ('secure' , _$secure, opt: true , def: true );
205
+ static bool _$highlighted (ListGameServer v) => v.highlighted;
206
+ static const Field <ListGameServer , bool > _f$highlighted =
207
+ Field ('highlighted' , _$highlighted, opt: true , def: false );
205
208
206
209
@override
207
210
final MappableFields <ListGameServer > fields = const {
208
211
#name: _f$name,
209
212
#address: _f$address,
210
213
#secure: _f$secure,
214
+ #highlighted: _f$highlighted,
211
215
};
212
216
213
217
static ListGameServer _instantiate (DecodingData data) {
214
218
return ListGameServer (
215
219
name: data.dec (_f$name),
216
220
address: data.dec (_f$address),
217
- secure: data.dec (_f$secure));
221
+ secure: data.dec (_f$secure),
222
+ highlighted: data.dec (_f$highlighted));
218
223
}
219
224
220
225
@override
@@ -272,7 +277,7 @@ extension ListGameServerValueCopy<$R, $Out>
272
277
abstract class ListGameServerCopyWith <$R , $In extends ListGameServer , $Out >
273
278
implements GameServerCopyWith <$R , $In , $Out > {
274
279
@override
275
- $R call ({String ? name, String ? address, bool ? secure});
280
+ $R call ({String ? name, String ? address, bool ? secure, bool ? highlighted });
276
281
ListGameServerCopyWith <$R2 , $In , $Out2 > $chain <$R2 , $Out2 >(
277
282
Then <$Out2 , $R2 > t);
278
283
}
@@ -286,17 +291,19 @@ class _ListGameServerCopyWithImpl<$R, $Out>
286
291
late final ClassMapperBase <ListGameServer > $mapper =
287
292
ListGameServerMapper .ensureInitialized ();
288
293
@override
289
- $R call ({String ? name, String ? address, bool ? secure}) =>
294
+ $R call ({String ? name, String ? address, bool ? secure, bool ? highlighted }) =>
290
295
$apply (FieldCopyWithData ({
291
296
if (name != null ) #name: name,
292
297
if (address != null ) #address: address,
293
- if (secure != null ) #secure: secure
298
+ if (secure != null ) #secure: secure,
299
+ if (highlighted != null ) #highlighted: highlighted
294
300
}));
295
301
@override
296
302
ListGameServer $make (CopyWithData data) => ListGameServer (
297
303
name: data.get (#name, or: $value.name),
298
304
address: data.get (#address, or: $value.address),
299
- secure: data.get (#secure, or: $value.secure));
305
+ secure: data.get (#secure, or: $value.secure),
306
+ highlighted: data.get (#highlighted, or: $value.highlighted));
300
307
301
308
@override
302
309
ListGameServerCopyWith <$R2 , ListGameServer , $Out2 > $chain <$R2 , $Out2 >(
@@ -993,3 +1000,115 @@ class _ServerStateCopyWithImpl<$R, $Out>
993
1000
Then <$Out2 , $R2 > t) =>
994
1001
_ServerStateCopyWithImpl <$R2 , $Out2 >($value, $cast, t);
995
1002
}
1003
+
1004
+ class ServerListMapper extends ClassMapperBase <ServerList > {
1005
+ ServerListMapper ._();
1006
+
1007
+ static ServerListMapper ? _instance;
1008
+ static ServerListMapper ensureInitialized () {
1009
+ if (_instance == null ) {
1010
+ MapperContainer .globals.use (_instance = ServerListMapper ._());
1011
+ ListGameServerMapper .ensureInitialized ();
1012
+ }
1013
+ return _instance! ;
1014
+ }
1015
+
1016
+ @override
1017
+ final String id = 'ServerList' ;
1018
+
1019
+ static List <ListGameServer > _$servers (ServerList v) => v.servers;
1020
+ static const Field <ServerList , List <ListGameServer >> _f$servers =
1021
+ Field ('servers' , _$servers, opt: true , def: const []);
1022
+
1023
+ @override
1024
+ final MappableFields <ServerList > fields = const {
1025
+ #servers: _f$servers,
1026
+ };
1027
+
1028
+ static ServerList _instantiate (DecodingData data) {
1029
+ return ServerList (servers: data.dec (_f$servers));
1030
+ }
1031
+
1032
+ @override
1033
+ final Function instantiate = _instantiate;
1034
+
1035
+ static ServerList fromMap (Map <String , dynamic > map) {
1036
+ return ensureInitialized ().decodeMap <ServerList >(map);
1037
+ }
1038
+
1039
+ static ServerList fromJson (String json) {
1040
+ return ensureInitialized ().decodeJson <ServerList >(json);
1041
+ }
1042
+ }
1043
+
1044
+ mixin ServerListMappable {
1045
+ String toJson () {
1046
+ return ServerListMapper .ensureInitialized ()
1047
+ .encodeJson <ServerList >(this as ServerList );
1048
+ }
1049
+
1050
+ Map <String , dynamic > toMap () {
1051
+ return ServerListMapper .ensureInitialized ()
1052
+ .encodeMap <ServerList >(this as ServerList );
1053
+ }
1054
+
1055
+ ServerListCopyWith <ServerList , ServerList , ServerList > get copyWith =>
1056
+ _ServerListCopyWithImpl <ServerList , ServerList >(
1057
+ this as ServerList , $identity, $identity);
1058
+ @override
1059
+ String toString () {
1060
+ return ServerListMapper .ensureInitialized ()
1061
+ .stringifyValue (this as ServerList );
1062
+ }
1063
+
1064
+ @override
1065
+ bool operator == (Object other) {
1066
+ return ServerListMapper .ensureInitialized ()
1067
+ .equalsValue (this as ServerList , other);
1068
+ }
1069
+
1070
+ @override
1071
+ int get hashCode {
1072
+ return ServerListMapper .ensureInitialized ().hashValue (this as ServerList );
1073
+ }
1074
+ }
1075
+
1076
+ extension ServerListValueCopy <$R , $Out >
1077
+ on ObjectCopyWith <$R , ServerList , $Out > {
1078
+ ServerListCopyWith <$R , ServerList , $Out > get $asServerList =>
1079
+ $base.as ((v, t, t2) => _ServerListCopyWithImpl <$R , $Out >(v, t, t2));
1080
+ }
1081
+
1082
+ abstract class ServerListCopyWith <$R , $In extends ServerList , $Out >
1083
+ implements ClassCopyWith <$R , $In , $Out > {
1084
+ ListCopyWith <$R , ListGameServer ,
1085
+ ListGameServerCopyWith <$R , ListGameServer , ListGameServer >> get servers;
1086
+ $R call ({List <ListGameServer >? servers});
1087
+ ServerListCopyWith <$R2 , $In , $Out2 > $chain <$R2 , $Out2 >(Then <$Out2 , $R2 > t);
1088
+ }
1089
+
1090
+ class _ServerListCopyWithImpl <$R , $Out >
1091
+ extends ClassCopyWithBase <$R , ServerList , $Out >
1092
+ implements ServerListCopyWith <$R , ServerList , $Out > {
1093
+ _ServerListCopyWithImpl (super .value, super .then, super .then2);
1094
+
1095
+ @override
1096
+ late final ClassMapperBase <ServerList > $mapper =
1097
+ ServerListMapper .ensureInitialized ();
1098
+ @override
1099
+ ListCopyWith <$R , ListGameServer ,
1100
+ ListGameServerCopyWith <$R , ListGameServer , ListGameServer >>
1101
+ get servers => ListCopyWith ($value.servers,
1102
+ (v, t) => v.copyWith.$chain (t), (v) => call (servers: v));
1103
+ @override
1104
+ $R call ({List <ListGameServer >? servers}) =>
1105
+ $apply (FieldCopyWithData ({if (servers != null ) #servers: servers}));
1106
+ @override
1107
+ ServerList $make (CopyWithData data) =>
1108
+ ServerList (servers: data.get (#servers, or: $value.servers));
1109
+
1110
+ @override
1111
+ ServerListCopyWith <$R2 , ServerList , $Out2 > $chain <$R2 , $Out2 >(
1112
+ Then <$Out2 , $R2 > t) =>
1113
+ _ServerListCopyWithImpl <$R2 , $Out2 >($value, $cast, t);
1114
+ }
0 commit comments