fromMap static method
override
Construct from Map.
Implementation
static ChatNotificationSettings? 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 use_default_mute_for = _map['use_default_mute_for']! as bool;
var mute_for = _map['mute_for']! as int;
var use_default_sound = _map['use_default_sound']! as bool;
var sound_id = _map['sound_id']! as int64;
var use_default_show_preview = _map['use_default_show_preview']! as bool;
var show_preview = _map['show_preview']! as bool;
var use_default_mute_stories = _map['use_default_mute_stories']! as bool;
var mute_stories = _map['mute_stories']! as bool;
var use_default_story_sound = _map['use_default_story_sound']! as bool;
var story_sound_id = _map['story_sound_id']! as int64;
var use_default_show_story_sender =
_map['use_default_show_story_sender']! as bool;
var show_story_sender = _map['show_story_sender']! as bool;
var use_default_disable_pinned_message_notifications =
_map['use_default_disable_pinned_message_notifications']! as bool;
var disable_pinned_message_notifications =
_map['disable_pinned_message_notifications']! as bool;
var use_default_disable_mention_notifications =
_map['use_default_disable_mention_notifications']! as bool;
var disable_mention_notifications =
_map['disable_mention_notifications']! as bool;
return ChatNotificationSettings(
extra: extra,
clientId: clientId,
use_default_mute_for: use_default_mute_for,
mute_for: mute_for,
use_default_sound: use_default_sound,
sound_id: sound_id,
use_default_show_preview: use_default_show_preview,
show_preview: show_preview,
use_default_mute_stories: use_default_mute_stories,
mute_stories: mute_stories,
use_default_story_sound: use_default_story_sound,
story_sound_id: story_sound_id,
use_default_show_story_sender: use_default_show_story_sender,
show_story_sender: show_story_sender,
use_default_disable_pinned_message_notifications:
use_default_disable_pinned_message_notifications,
disable_pinned_message_notifications:
disable_pinned_message_notifications,
use_default_disable_mention_notifications:
use_default_disable_mention_notifications,
disable_mention_notifications: disable_mention_notifications,
);
}