DraftMessageContentVoiceNote.fromJson constructor

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

Parses a DraftMessageContentVoiceNote from TDLib JSON.

Implementation

factory DraftMessageContentVoiceNote.fromJson(Map<String, dynamic> json) =>
    DraftMessageContentVoiceNote(
      filePath: _readString(json['file_path']),
      duration: _readInt(json['duration']),
      waveform: _readString(json['waveform']),
      selfDestructType: _readOptional(
        json['self_destruct_type'],
        MessageSelfDestructType.fromJson,
      ),
    );