fromJson static method

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

Implementation

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

  return VideoNote(
    duration: (json['duration'] as int?) ?? 0,
    waveform: (json['waveform'] as String?) ?? '',
    length: (json['length'] as int?) ?? 0,
    minithumbnail: Minithumbnail.fromJson(
      tdMapFromJson(json['minithumbnail']),
    ),
    thumbnail: Thumbnail.fromJson(tdMapFromJson(json['thumbnail'])),
    speechRecognitionResult: SpeechRecognitionResult.fromJson(
      tdMapFromJson(json['speech_recognition_result']),
    ),
    video: File.fromJson(tdMapFromJson(json['video'])),
  );
}