GiphyGif.fromJson constructor

GiphyGif.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GiphyGif.fromJson(Map<String, dynamic> json) => GiphyGif(
    title: json['title'] as String?,
    type: json['type'] as String?,
    id: json['id'] as String?,
    slug: json['slug'] as String?,
    url: json['url'] 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?,
    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'] == null
        ? null
        : DateTime.parse(json['trending_datetime'] as String),
    user: json['user'] == null
        ? null
        : GiphyUser.fromJson(json['user'] as Map<String, dynamic>),
    images: json['images'] == null
        ? null
        : GiphyImages.fromJson(json['images'] as Map<String, dynamic>));