fromMap static method
override
Construct from Map.
Implementation
static UpdateNotificationGroup? 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 notification_group_id = _map['notification_group_id']! as int;
var type = NotificationGroupType.fromMap(_map['type'])!;
var chat_id = _map['chat_id']! as int;
var notification_settings_chat_id =
_map['notification_settings_chat_id']! as int;
var notification_sound_id = _map['notification_sound_id']! as int64;
var total_count = _map['total_count']! as int;
var added_notifications = List<Notification>.from(
(_map["added_notifications"] ?? []).map(
(e) => Notification.fromMap(e),
),
);
var removed_notification_ids = List<int>.from(
(_map["removed_notification_ids"] ?? []).map(
(e) => e as int,
),
);
return UpdateNotificationGroup(
extra: extra,
clientId: clientId,
notification_group_id: notification_group_id,
type: type,
chat_id: chat_id,
notification_settings_chat_id: notification_settings_chat_id,
notification_sound_id: notification_sound_id,
total_count: total_count,
added_notifications: added_notifications,
removed_notification_ids: removed_notification_ids,
);
}