MessageWidget.fromJson constructor

MessageWidget.fromJson(
  1. Map<String, dynamic> json
)

Parses a MessageWidget from TDLib JSON.

Implementation

factory MessageWidget.fromJson(Map<String, dynamic> json) => MessageWidget(
  width: _readInt(json['width']),
  height: _readInt(json['height']),
  html: _readString(json['html']),
  publicData: _readString(json['public_data']),
  chatData: _readString(json['chat_data']),
  widgetId: _readInt(json['widget_id']),
  caption: _readObject(json['caption'], FormattedText.fromJson),
  showCaptionAboveMedia: _readBool(json['show_caption_above_media']),
  isCopy: _readBool(json['is_copy']),
  canSendQueries: _readBool(json['can_send_queries']),
  canSendBackgroundQueries: _readBool(json['can_send_background_queries']),
);