DraftMessage.fromJson constructor

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

Parses a DraftMessage from TDLib JSON.

Implementation

factory DraftMessage.fromJson(Map<String, dynamic> json) => DraftMessage(
  replyTo: _readOptional(json['reply_to'], InputMessageReplyTo.fromJson),
  date: _readInt(json['date']),
  content: _readObject(json['content'], DraftMessageContent.fromJson),
  effectId: _readInt(json['effect_id']),
  suggestedPostInfo: _readOptional(
    json['suggested_post_info'],
    InputSuggestedPostInfo.fromJson,
  ),
);