Story.fromJson constructor
Parse from a json
Implementation
factory Story.fromJson(Map<String, dynamic> json) => Story(
id: json['id'],
senderChatId: json['sender_chat_id'],
date: json['date'],
isBeingEdited: json['is_being_edited'],
isEdited: json['is_edited'],
isPinned: json['is_pinned'],
isVisibleOnlyForSelf: json['is_visible_only_for_self'],
canBeForwarded: json['can_be_forwarded'],
canBeReplied: json['can_be_replied'],
canGetViewers: json['can_get_viewers'],
hasExpiredViewers: json['has_expired_viewers'],
interactionInfo: json['interaction_info'] == null
? null
: StoryInteractionInfo.fromJson(json['interaction_info']),
privacySettings:
StoryPrivacySettings.fromJson(json['privacy_settings']),
content: StoryContent.fromJson(json['content']),
caption: FormattedText.fromJson(json['caption']),
extra: json['@extra'],
clientId: json['@client_id'],
);