GiphyVideoPreviewAsset.fromJson constructor

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

Creates a GiphyVideoPreviewAsset object from a JSON map.

The JSON map should have keys 'width', 'height', and 'url'.

Implementation

factory GiphyVideoPreviewAsset.fromJson(Map<Object?, Object?> json) {
  return GiphyVideoPreviewAsset(
    width: json['width'] as int? ?? 0,
    height: json['height'] as int? ?? 0,
    url: json['url'] as String?,
  );
}