fromJson static method

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

Implementation

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

  return PageBlockVideo(
    video: Video.fromJson(json['video'] as Map<String, dynamic>?),
    caption:
        PageBlockCaption.fromJson(json['caption'] as Map<String, dynamic>?),
    needAutoplay: (json['need_autoplay'] as bool?) ?? false,
    isLooped: (json['is_looped'] as bool?) ?? false,
    hasSpoiler: (json['has_spoiler'] as bool?) ?? false,
  );
}