fromMap static method
override
Construct from Map.
Implementation
static SendStory? 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 chat_id = _map['chat_id']! as int;
var content = InputStoryContent.fromMap(_map['content'])!;
var areas = InputStoryAreas.fromMap(_map['areas']);
var caption = FormattedText.fromMap(_map['caption']);
var privacy_settings =
StoryPrivacySettings.fromMap(_map['privacy_settings'])!;
var active_period = _map['active_period']! as int;
var is_pinned = _map['is_pinned']! as bool;
var protect_content = _map['protect_content']! as bool;
return SendStory(
extra: extra,
clientId: clientId,
chat_id: chat_id,
content: content,
areas: areas,
caption: caption,
privacy_settings: privacy_settings,
active_period: active_period,
is_pinned: is_pinned,
protect_content: protect_content,
);
}