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 InputMessageWidget? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputMessageWidget(
width: (json['width'] as int?) ?? 0,
height: (json['height'] as int?) ?? 0,
html: (json['html'] as String?) ?? '',
publicData: (json['public_data'] as String?) ?? '',
chatData: (json['chat_data'] as String?) ?? '',
caption: FormattedText.fromJson(json['caption'] as Map<String, dynamic>?),
showCaptionAboveMedia:
(json['show_caption_above_media'] as bool?) ?? false,
allowQueries: (json['allow_queries'] as bool?) ?? false,
isShared: (json['is_shared'] as bool?) ?? false,
);
}