GiphyCollection.fromJson constructor

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

Implementation

factory GiphyCollection.fromJson(Map<String, dynamic> json) =>
    GiphyCollection(
        data: (json['data'] as List?)
            ?.map((e) => e == null
                ? null
                : GiphyGif.fromJson(e as Map<String, dynamic>))
            .toList(),
        pagination: json['pagination'] == null
            ? null
            : GiphyPagination.fromJson(
                json['pagination'] as Map<String, dynamic>),
        meta: json['meta'] == null
            ? null
            : GiphyMeta.fromJson(json['meta'] as Map<String, dynamic>));