72 lines
2.6 KiB
Dart
72 lines
2.6 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'blog_post_model.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
BlogPostModel _$BlogPostModelFromJson(Map<String, dynamic> json) =>
|
|
$checkedCreate(
|
|
'BlogPostModel',
|
|
json,
|
|
($checkedConvert) {
|
|
final val = BlogPostModel(
|
|
name: $checkedConvert('name', (v) => v as String),
|
|
title: $checkedConvert('title', (v) => v as String),
|
|
publishedOn: $checkedConvert('published_on', (v) => v as String?),
|
|
blogger: $checkedConvert('blogger', (v) => v as String?),
|
|
blogIntro: $checkedConvert('blog_intro', (v) => v as String?),
|
|
content: $checkedConvert('content', (v) => v as String?),
|
|
contentHtml: $checkedConvert('content_html', (v) => v as String?),
|
|
metaImage: $checkedConvert('meta_image', (v) => v as String?),
|
|
metaDescription: $checkedConvert(
|
|
'meta_description',
|
|
(v) => v as String?,
|
|
),
|
|
blogCategory: $checkedConvert('blog_category', (v) => v as String?),
|
|
);
|
|
return val;
|
|
},
|
|
fieldKeyMap: const {
|
|
'publishedOn': 'published_on',
|
|
'blogIntro': 'blog_intro',
|
|
'contentHtml': 'content_html',
|
|
'metaImage': 'meta_image',
|
|
'metaDescription': 'meta_description',
|
|
'blogCategory': 'blog_category',
|
|
},
|
|
);
|
|
|
|
Map<String, dynamic> _$BlogPostModelToJson(BlogPostModel instance) =>
|
|
<String, dynamic>{
|
|
'name': instance.name,
|
|
'title': instance.title,
|
|
'published_on': ?instance.publishedOn,
|
|
'blogger': ?instance.blogger,
|
|
'blog_intro': ?instance.blogIntro,
|
|
'content': ?instance.content,
|
|
'content_html': ?instance.contentHtml,
|
|
'meta_image': ?instance.metaImage,
|
|
'meta_description': ?instance.metaDescription,
|
|
'blog_category': ?instance.blogCategory,
|
|
};
|
|
|
|
BlogPostsResponse _$BlogPostsResponseFromJson(Map<String, dynamic> json) =>
|
|
$checkedCreate('BlogPostsResponse', json, ($checkedConvert) {
|
|
final val = BlogPostsResponse(
|
|
message: $checkedConvert(
|
|
'message',
|
|
(v) => (v as List<dynamic>)
|
|
.map((e) => BlogPostModel.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
),
|
|
);
|
|
return val;
|
|
});
|
|
|
|
Map<String, dynamic> _$BlogPostsResponseToJson(BlogPostsResponse instance) =>
|
|
<String, dynamic>{
|
|
'message': instance.message.map((e) => e.toJson()).toList(),
|
|
};
|