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(tdMapFromJson(json['voice_note'])),
    duration: (json['duration'] as int?) ?? 0,
    waveform: (json['waveform'] as String?) ?? '',
  );
}