fromJson static method

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

Implementation

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

  return InputVoiceNote(
    voiceNote:
        InputFile.fromJson(json['voice_note'] as Map<String, dynamic>?)!,
    duration: (json['duration'] as int?) ?? 0,
    waveform: (json['waveform'] as String?) ?? '',
  );
}