fromMap static method

PageBlockEmbedded? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static PageBlockEmbedded? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var url = _map['url']! as String;
  var html = _map['html']! as String;
  var poster_photo = Photo.fromMap(_map['poster_photo']);
  var width = _map['width']! as int;
  var height = _map['height']! as int;
  var caption = PageBlockCaption.fromMap(_map['caption'])!;
  var is_full_width = _map['is_full_width']! as bool;
  var allow_scrolling = _map['allow_scrolling']! as bool;
  return PageBlockEmbedded(
    extra: extra,
    clientId: clientId,
    url: url,
    html: html,
    poster_photo: poster_photo,
    width: width,
    height: height,
    caption: caption,
    is_full_width: is_full_width,
    allow_scrolling: allow_scrolling,
  );
}