fromMap static method

ScopeNotificationSettings? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static ScopeNotificationSettings? 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 mute_for = _map['mute_for']! as int;
  var sound_id = _map['sound_id']! as int64;
  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 story_sound_id = _map['story_sound_id']! as int64;
  var show_story_sender = _map['show_story_sender']! as bool;
  var disable_pinned_message_notifications =
      _map['disable_pinned_message_notifications']! as bool;
  var disable_mention_notifications =
      _map['disable_mention_notifications']! as bool;
  return ScopeNotificationSettings(
    extra: extra,
    clientId: clientId,
    mute_for: mute_for,
    sound_id: sound_id,
    show_preview: show_preview,
    use_default_mute_stories: use_default_mute_stories,
    mute_stories: mute_stories,
    story_sound_id: story_sound_id,
    show_story_sender: show_story_sender,
    disable_pinned_message_notifications:
        disable_pinned_message_notifications,
    disable_mention_notifications: disable_mention_notifications,
  );
}