fromMap static method
override
Construct from Map.
Implementation
static ForumTopic? 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 info = ForumTopicInfo.fromMap(_map['info'])!;
var last_message = Message.fromMap(_map['last_message']);
var is_pinned = _map['is_pinned']! as bool;
var unread_count = _map['unread_count']! as int;
var last_read_inbox_message_id = _map['last_read_inbox_message_id']! as int;
var last_read_outbox_message_id =
_map['last_read_outbox_message_id']! as int;
var unread_mention_count = _map['unread_mention_count']! as int;
var unread_reaction_count = _map['unread_reaction_count']! as int;
var notification_settings =
ChatNotificationSettings.fromMap(_map['notification_settings'])!;
var draft_message = DraftMessage.fromMap(_map['draft_message']);
return ForumTopic(
extra: extra,
clientId: clientId,
info: info,
last_message: last_message,
is_pinned: is_pinned,
unread_count: unread_count,
last_read_inbox_message_id: last_read_inbox_message_id,
last_read_outbox_message_id: last_read_outbox_message_id,
unread_mention_count: unread_mention_count,
unread_reaction_count: unread_reaction_count,
notification_settings: notification_settings,
draft_message: draft_message,
);
}