fromJson static method

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

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']),
    ),
  );
}