fromJson static method

InputInlineQueryResultVoiceNote? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static InputInlineQueryResultVoiceNote? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return InputInlineQueryResultVoiceNote(
    id: (json['id'] as String?) ?? '',
    title: (json['title'] as String?) ?? '',
    voiceNoteUrl: (json['voice_note_url'] as String?) ?? '',
    voiceNoteDuration: (json['voice_note_duration'] as int?) ?? 0,
    replyMarkup:
        ReplyMarkup.fromJson(json['reply_markup'] as Map<String, dynamic>?),
    inputMessageContent: InputMessageContent.fromJson(
        json['input_message_content'] as Map<String, dynamic>?)!,
  );
}