mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
49 lines
1.2 KiB
Dart
49 lines
1.2 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'result.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
Result<T> _$ResultFromJson<T>(
|
|
Map<String, dynamic> json,
|
|
T Function(Object? json) fromJsonT,
|
|
) =>
|
|
Result<T>(
|
|
code: json['code'] as int,
|
|
msg: json['msg'] as String?,
|
|
data: _$nullableGenericFromJson(json['data'], fromJsonT),
|
|
);
|
|
|
|
Map<String, dynamic> _$ResultToJson<T>(
|
|
Result<T> instance,
|
|
Object? Function(T value) toJsonT,
|
|
) {
|
|
final val = <String, dynamic>{
|
|
'code': instance.code,
|
|
};
|
|
|
|
void writeNotNull(String key, dynamic value) {
|
|
if (value != null) {
|
|
val[key] = value;
|
|
}
|
|
}
|
|
|
|
writeNotNull('msg', instance.msg);
|
|
writeNotNull('data', _$nullableGenericToJson(instance.data, toJsonT));
|
|
return val;
|
|
}
|
|
|
|
T? _$nullableGenericFromJson<T>(
|
|
Object? input,
|
|
T Function(Object? json) fromJson,
|
|
) =>
|
|
input == null ? null : fromJson(input);
|
|
|
|
Object? _$nullableGenericToJson<T>(
|
|
T? input,
|
|
Object? Function(T value) toJson,
|
|
) =>
|
|
input == null ? null : toJson(input);
|