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