// GENERATED CODE - DO NOT MODIFY BY HAND part of 'resource.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** Resource _$ResourceFromJson(Map json) => Resource( name: json['name'] as String? ?? "", size: json['size'] as int? ?? 0, range: json['range'] as bool? ?? false, files: (json['files'] as List) .map((e) => FileInfo.fromJson(e as Map)) .toList(), hash: json['hash'] as String? ?? "", ); Map _$ResourceToJson(Resource instance) => { 'name': instance.name, 'size': instance.size, 'range': instance.range, 'files': instance.files.map((e) => e.toJson()).toList(), 'hash': instance.hash, }; FileInfo _$FileInfoFromJson(Map json) => FileInfo( path: json['path'] as String? ?? "", name: json['name'] as String, size: json['size'] as int? ?? 0, req: json['req'] == null ? null : Request.fromJson(json['req'] as Map), ); Map _$FileInfoToJson(FileInfo instance) { final val = { 'path': instance.path, 'name': instance.name, 'size': instance.size, }; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('req', instance.req?.toJson()); return val; }