fromJson static method

LinkPreviewTypeEmbeddedAnimationPlayer? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static LinkPreviewTypeEmbeddedAnimationPlayer? fromJson(
  Map<String, dynamic>? json,
) {
  if (json == null) {
    return null;
  }

  return LinkPreviewTypeEmbeddedAnimationPlayer(
    url: (json['url'] as String?) ?? '',
    animation: Animation.fromJson(tdMapFromJson(json['animation'])),
    thumbnail: Photo.fromJson(tdMapFromJson(json['thumbnail'])),
    duration: (json['duration'] as int?) ?? 0,
    width: (json['width'] as int?) ?? 0,
    height: (json['height'] as int?) ?? 0,
  );
}