Message.fromMap constructor
Implementation
Message.fromMap(Map<String, dynamic> map) {
extra = map['@extra'];
client_id = map['@client_id'];
id = map['id'];
if (map['sender_id'] != null) {
sender_id = TdApiMap.fromMap(map['sender_id']) as MessageSender;
}
chat_id = map['chat_id'];
if (map['sending_state'] != null) {
sending_state = TdApiMap.fromMap(map['sending_state']) as MessageSendingState;
}
if (map['scheduling_state'] != null) {
scheduling_state = TdApiMap.fromMap(map['scheduling_state']) as MessageSchedulingState;
}
is_outgoing = map['is_outgoing'];
is_pinned = map['is_pinned'];
can_be_edited = map['can_be_edited'];
can_be_forwarded = map['can_be_forwarded'];
can_be_saved = map['can_be_saved'];
can_be_deleted_only_for_self = map['can_be_deleted_only_for_self'];
can_be_deleted_for_all_users = map['can_be_deleted_for_all_users'];
can_get_added_reactions = map['can_get_added_reactions'];
can_get_statistics = map['can_get_statistics'];
can_get_message_thread = map['can_get_message_thread'];
can_get_viewers = map['can_get_viewers'];
can_get_media_timestamp_links = map['can_get_media_timestamp_links'];
can_report_reactions = map['can_report_reactions'];
has_timestamped_media = map['has_timestamped_media'];
is_channel_post = map['is_channel_post'];
is_topic_message = map['is_topic_message'];
contains_unread_mention = map['contains_unread_mention'];
date = map['date'];
edit_date = map['edit_date'];
if (map['forward_info'] != null) {
forward_info = TdApiMap.fromMap(map['forward_info']) as MessageForwardInfo;
}
if (map['interaction_info'] != null) {
interaction_info = TdApiMap.fromMap(map['interaction_info']) as MessageInteractionInfo;
}
if (map['unread_reactions'] != null) {
unread_reactions = [];
for (var someValue in map['unread_reactions']) {
if (someValue != null) {
unread_reactions?.add(TdApiMap.fromMap(someValue) as UnreadReaction);
}
}
}
reply_in_chat_id = map['reply_in_chat_id'];
reply_to_message_id = map['reply_to_message_id'];
message_thread_id = map['message_thread_id'];
self_destruct_time = map['self_destruct_time'];
self_destruct_in = map['self_destruct_in'];
auto_delete_in = map['auto_delete_in'];
via_bot_user_id = map['via_bot_user_id'];
author_signature = map['author_signature'];
media_album_id = map['media_album_id'];
restriction_reason = map['restriction_reason'];
if (map['content'] != null) {
content = TdApiMap.fromMap(map['content']) as MessageContent;
}
if (map['reply_markup'] != null) {
reply_markup = TdApiMap.fromMap(map['reply_markup']) as ReplyMarkup;
}
}