fromJson static method
Inherited by: InputMessageAnimation InputMessageAudio InputMessageChecklist InputMessageContact InputMessageDice InputMessageDocument InputMessageForwarded InputMessageGame InputMessageInvoice InputMessageLiveLocation InputMessageLocation InputMessagePaidMedia InputMessagePhoto InputMessagePoll InputMessageRichMessage InputMessageSharedWidget InputMessageStakeDice InputMessageSticker InputMessageStory InputMessageText InputMessageVenue InputMessageVideoNote InputMessageVideo InputMessageVoiceNote InputMessageWidget
Implementation
static InputMessageVoiceNote? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputMessageVoiceNote(
voiceNote:
InputVoiceNote.fromJson(json['voice_note'] as Map<String, dynamic>?)!,
caption: FormattedText.fromJson(json['caption'] as Map<String, dynamic>?),
selfDestructType: MessageSelfDestructType.fromJson(
json['self_destruct_type'] as Map<String, dynamic>?),
);
}