GiphyVideoPreviews.fromJson constructor

GiphyVideoPreviews.fromJson(
  1. Map<Object?, Object?> json
)

Creates a GiphyVideoPreviews object from a JSON map.

The JSON map should have keys 'fixedWidth' and 'fixedHeight', each containing the preview asset as a nested JSON object.

Implementation

factory GiphyVideoPreviews.fromJson(Map<Object?, Object?> json) {
  return GiphyVideoPreviews(
    fixedWidth: GiphyVideoPreviewAsset.fromJson(
        json['fixedWidth'] as Map<Object?, Object?>),
    fixedHeight: GiphyVideoPreviewAsset.fromJson(
        json['fixedHeight'] as Map<Object?, Object?>),
  );
}