// GENERATED CODE - DO NOT MODIFY BY HAND part of data; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** Index _$IndexFromJson(Map json) => $checkedCreate( 'Index', json, ($checkedConvert) { final val = Index( $checkedConvert( 'samples', (v) => (v as List) .map((e) => Sample.fromJson(e as Map)) .toList()), ); return val; }, ); Map _$IndexToJson(Index instance) => { 'samples': instance.samples, }; Sample _$SampleFromJson(Map json) => $checkedCreate( 'Sample', json, ($checkedConvert) { final val = Sample( name: $checkedConvert('name', (v) => v as String), author: $checkedConvert('author', (v) => v as String? ?? 'Flutter'), screenshots: $checkedConvert( 'screenshots', (v) => (v as List) .map((e) => Screenshot.fromJson(e as Map)) .toList()), source: $checkedConvert('source', (v) => v as String), web: $checkedConvert('web', (v) => v as String?), description: $checkedConvert('description', (v) => v as String), difficulty: $checkedConvert('difficulty', (v) => v as String? ?? 'beginner'), widgets: $checkedConvert( 'widgets', (v) => (v as List?)?.map((e) => e as String).toList() ?? const []), packages: $checkedConvert( 'packages', (v) => (v as List?)?.map((e) => e as String).toList() ?? const []), tags: $checkedConvert( 'tags', (v) => (v as List?)?.map((e) => e as String).toList() ?? const []), platforms: $checkedConvert( 'platforms', (v) => (v as List?)?.map((e) => e as String).toList() ?? const []), links: $checkedConvert( 'links', (v) => (v as List?) ?.map((e) => Link.fromJson(e as Map)) .toList() ?? const []), type: $checkedConvert('type', (v) => v as String), date: $checkedConvert( 'date', (v) => v == null ? null : DateTime.parse(v as String)), channel: $checkedConvert('channel', (v) => v as String?), ); return val; }, ); Map _$SampleToJson(Sample instance) => { 'name': instance.name, 'author': instance.author, 'screenshots': instance.screenshots, 'source': instance.source, 'web': instance.web, 'description': instance.description, 'difficulty': instance.difficulty, 'widgets': instance.widgets, 'packages': instance.packages, 'tags': instance.tags, 'platforms': instance.platforms, 'links': instance.links, 'type': instance.type, 'date': instance.date?.toIso8601String(), 'channel': instance.channel, }; Screenshot _$ScreenshotFromJson(Map json) => $checkedCreate( 'Screenshot', json, ($checkedConvert) { final val = Screenshot( $checkedConvert('url', (v) => v as String), $checkedConvert('alt', (v) => v as String), ); return val; }, ); Map _$ScreenshotToJson(Screenshot instance) => { 'url': instance.url, 'alt': instance.alt, }; Link _$LinkFromJson(Map json) => $checkedCreate( 'Link', json, ($checkedConvert) { final val = Link( $checkedConvert('text', (v) => v as String), $checkedConvert('href', (v) => v as String), ); return val; }, ); Map _$LinkToJson(Link instance) => { 'text': instance.text, 'href': instance.href, };