fromMap static method

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

Construct from Map.

Implementation

static MessageText? 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 text = FormattedText.fromMap(_map['text'])!;
  var web_page = WebPage.fromMap(_map['web_page']);
  return MessageText(
    extra: extra,
    clientId: clientId,
    text: text,
    web_page: web_page,
  );
}