fromMap static method

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

Construct from Map.

Implementation

static WebPageInstantView? 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 page_blocks = List<PageBlock>.from(
    (_map["page_blocks"] ?? []).map(
      (e) => PageBlock.fromMap(e),
    ),
  );
  var view_count = _map['view_count']! as int;
  var version = _map['version']! as int;
  var is_rtl = _map['is_rtl']! as bool;
  var is_full = _map['is_full']! as bool;
  var feedback_link = InternalLinkType.fromMap(_map['feedback_link'])!;
  return WebPageInstantView(
    extra: extra,
    clientId: clientId,
    page_blocks: page_blocks,
    view_count: view_count,
    version: version,
    is_rtl: is_rtl,
    is_full: is_full,
    feedback_link: feedback_link,
  );
}