fromJson static method
Inherited by: DraftMessageContentRichMessage DraftMessageContentText DraftMessageContentVideoNote DraftMessageContentVoiceNote
Implementation
static DraftMessageContentVoiceNote? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return DraftMessageContentVoiceNote(
filePath: (json['file_path'] as String?) ?? '',
duration: (json['duration'] as int?) ?? 0,
waveform: (json['waveform'] as String?) ?? '',
selfDestructType: MessageSelfDestructType.fromJson(
tdMapFromJson(json['self_destruct_type']),
),
);
}