forked from eatvio/eatvio_app
148 lines
5.4 KiB
Dart
148 lines
5.4 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'diets_pagination_model.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(Map<String, dynamic> json) => _$DietsPaginationImpl(
|
|
data: (json['data'] as List<dynamic>).map((e) => Datum.fromJson(e as Map<String, dynamic>)).toList(),
|
|
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
|
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
|
);
|
|
|
|
Map<String, dynamic> _$$DietsPaginationImplToJson(_$DietsPaginationImpl instance) => <String, dynamic>{
|
|
'data': instance.data,
|
|
'links': instance.links,
|
|
'meta': instance.meta,
|
|
};
|
|
|
|
_$DatumImpl _$$DatumImplFromJson(Map<String, dynamic> json) => _$DatumImpl(
|
|
id: (json['id'] as num).toInt(),
|
|
name: json['name'] as String,
|
|
image: json['image'] as String,
|
|
duration: (json['duration'] as num).toInt(),
|
|
state: json['state'] as String,
|
|
type: Type.fromJson(json['type'] as Map<String, dynamic>),
|
|
details: json['details'] as String,
|
|
dailySchedule: (json['daily_schedule'] as List<dynamic>)
|
|
.map((e) => (e as List<dynamic>).map((e) => (e as List<dynamic>).map((e) => DailySchedule.fromJson(e as Map<String, dynamic>)).toList()).toList())
|
|
.toList(),
|
|
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
|
totalLikes: (json['total_likes'] as num).toInt(),
|
|
totalViews: (json['total_views'] as num).toInt(),
|
|
totalComments: (json['total_comments'] as num).toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$$DatumImplToJson(_$DatumImpl instance) => <String, dynamic>{
|
|
'id': instance.id,
|
|
'name': instance.name,
|
|
'image': instance.image,
|
|
'duration': instance.duration,
|
|
'state': instance.state,
|
|
'type': instance.type,
|
|
'details': instance.details,
|
|
'daily_schedule': instance.dailySchedule,
|
|
'author': instance.author,
|
|
'total_likes': instance.totalLikes,
|
|
'total_views': instance.totalViews,
|
|
'total_comments': instance.totalComments,
|
|
};
|
|
|
|
_$AuthorImpl _$$AuthorImplFromJson(Map<String, dynamic> json) => _$AuthorImpl(
|
|
authorSlug: json['author_slug'] as String,
|
|
authorName: json['author_name'] as String,
|
|
authorProfileIcon: json['author_profile_icon'] as String,
|
|
authorIsMe: json['author_is_me'] as bool,
|
|
);
|
|
|
|
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) => <String, dynamic>{
|
|
'author_slug': instance.authorSlug,
|
|
'author_name': instance.authorName,
|
|
'author_profile_icon': instance.authorProfileIcon,
|
|
'author_is_me': instance.authorIsMe,
|
|
};
|
|
|
|
_$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) => _$DailyScheduleImpl(
|
|
name: json['name'] as String,
|
|
uniq: json['uniq'] as String,
|
|
portion: $enumDecode(_$PortionEnumMap, json['portion']),
|
|
quantity: (json['quantity'] as num).toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) => <String, dynamic>{
|
|
'name': instance.name,
|
|
'uniq': instance.uniq,
|
|
'portion': _$PortionEnumMap[instance.portion]!,
|
|
'quantity': instance.quantity,
|
|
};
|
|
|
|
const _$PortionEnumMap = {
|
|
Portion.GRAMS: 'grams',
|
|
Portion.MILLILITERS: 'milliliters',
|
|
Portion.PCS: 'pcs',
|
|
};
|
|
|
|
_$TypeImpl _$$TypeImplFromJson(Map<String, dynamic> json) => _$TypeImpl(
|
|
alko: json['alko'] as bool?,
|
|
veg: json['veg'] as bool?,
|
|
corb: json['corb'] as bool?,
|
|
meat: json['meat'] as bool?,
|
|
);
|
|
|
|
Map<String, dynamic> _$$TypeImplToJson(_$TypeImpl instance) => <String, dynamic>{
|
|
'alko': instance.alko,
|
|
'veg': instance.veg,
|
|
'corb': instance.corb,
|
|
'meat': instance.meat,
|
|
};
|
|
|
|
_$LinksImpl _$$LinksImplFromJson(Map<String, dynamic> json) => _$LinksImpl(
|
|
first: json['first'] as String,
|
|
last: json['last'] as String,
|
|
prev: json['prev'],
|
|
next: json['next'],
|
|
);
|
|
|
|
Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) => <String, dynamic>{
|
|
'first': instance.first,
|
|
'last': instance.last,
|
|
'prev': instance.prev,
|
|
'next': instance.next,
|
|
};
|
|
|
|
_$MetaImpl _$$MetaImplFromJson(Map<String, dynamic> json) => _$MetaImpl(
|
|
currentPage: (json['current_page'] as num).toInt(),
|
|
from: (json['from'] as num).toInt(),
|
|
lastPage: (json['last_page'] as num).toInt(),
|
|
links: (json['links'] as List<dynamic>).map((e) => Link.fromJson(e as Map<String, dynamic>)).toList(),
|
|
path: json['path'] as String,
|
|
perPage: (json['per_page'] as num).toInt(),
|
|
to: (json['to'] as num).toInt(),
|
|
total: (json['total'] as num).toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) => <String, dynamic>{
|
|
'current_page': instance.currentPage,
|
|
'from': instance.from,
|
|
'last_page': instance.lastPage,
|
|
'links': instance.links,
|
|
'path': instance.path,
|
|
'per_page': instance.perPage,
|
|
'to': instance.to,
|
|
'total': instance.total,
|
|
};
|
|
|
|
_$LinkImpl _$$LinkImplFromJson(Map<String, dynamic> json) => _$LinkImpl(
|
|
url: json['url'] as String?,
|
|
label: json['label'] as String,
|
|
active: json['active'] as bool,
|
|
);
|
|
|
|
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) => <String, dynamic>{
|
|
'url': instance.url,
|
|
'label': instance.label,
|
|
'active': instance.active,
|
|
};
|