GiphyData.fromJson constructor
GiphyData.fromJson(
- Map<String, dynamic> json
)
Implementation
factory GiphyData.fromJson(Map<String, dynamic> json) => GiphyData(
type: json['type'] as String?,
id: json['id'] as String?,
url: json['url'] as String?,
slug: json['slug'] as String?,
bitlyGifUrl: json['bitly_gif_url'] as String?,
bitlyUrl: json['bitly_url'] as String?,
embedUrl: json['embed_url'] as String?,
username: json['username'] as String?,
source: json['source'] as String?,
title: json['title'] as String?,
rating: json['rating'] as String?,
contentUrl: json['content_url'] as String?,
sourceTld: json['source_tld'] as String?,
sourcePostUrl: json['source_post_url'] as String?,
isSticker: json['is_sticker'] as int?,
importDatetime: json['import_datetime'] == null
? null
: DateTime.parse(json['import_datetime'] as String),
trendingDatetime: json['trending_datetime'] as String?,
images: json['images'] == null
? null
: GifImages.fromJson(json['images'] as Map<String, dynamic>),
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
analyticsResponsePayload: json['analytics_response_payload'] as String?,
analytics: json['analytics'] == null
? null
: Analytics.fromJson(json['analytics'] as Map<String, dynamic>),
);