fromMap static method

VideoNote? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static VideoNote? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var duration = _map['duration']! as int;
  var waveform = _map['waveform']! as bytes;
  var length = _map['length']! as int;
  var minithumbnail = Minithumbnail.fromMap(_map['minithumbnail']);
  var thumbnail = Thumbnail.fromMap(_map['thumbnail']);
  var speech_recognition_result =
      SpeechRecognitionResult.fromMap(_map['speech_recognition_result']);
  var video = File.fromMap(_map['video'])!;
  return VideoNote(
    extra: extra,
    clientId: clientId,
    duration: duration,
    waveform: waveform,
    length: length,
    minithumbnail: minithumbnail,
    thumbnail: thumbnail,
    speech_recognition_result: speech_recognition_result,
    video: video,
  );
}