UCapturedVideo.fromMap constructor

UCapturedVideo.fromMap(
  1. Map<Object?, Object?> map
)

Implementation

factory UCapturedVideo.fromMap(Map<Object?, Object?> map) => UCapturedVideo(
  path: (map["path"] as String?) ?? "",
  duration: Duration(milliseconds: ((map["durationMs"] as num?) ?? 0).toInt()),
  width: ((map["width"] as num?) ?? 0).toInt(),
  height: ((map["height"] as num?) ?? 0).toInt(),
  sizeInBytes: ((map["sizeInBytes"] as num?) ?? 0).toInt(),
  container: UVideoContainer.values.firstWhere((UVideoContainer c) => c.name == map["container"], orElse: () => UVideoContainer.mp4),
  bytes: map["bytes"] as Uint8List?,
  thumbnail: map["thumbnail"] as Uint8List?,
);