fromJson static method

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

Implementation

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

  return InputMessageVoiceNote(
    voiceNote: InputVoiceNote.fromJson(tdMapFromJson(json['voice_note'])),
    caption: FormattedText.fromJson(tdMapFromJson(json['caption'])),
    selfDestructType: MessageSelfDestructType.fromJson(
      tdMapFromJson(json['self_destruct_type']),
    ),
  );
}