VideoMedia.fromMap constructor

VideoMedia.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory VideoMedia.fromMap(Map<String, dynamic> map) {
  return VideoMedia(
    resourceId: map[_MediaConstants.resourceId] as String,
    mime: map[_MediaConstants.mime] as String,
    path: Path(
      origin: map[_MediaConstants.originPath] as String?,
      local: map[_MediaConstants.localPath] as String,
      remote: map[_MediaConstants.remotePath] as String,
    ),
    synced: map[_MediaConstants.synced] as bool,
    createdAt: map[_MediaConstants.createdAt] as int,
    updatedAt: map[_MediaConstants.updatedAt] as int,
    blurhash: map[_MediaConstants.blurhash] as String,
    width: map[_MediaConstants.width] as int,
    height: map[_MediaConstants.height] as int,
    duration: map[_MediaConstants.duration] as int,
    orientation: map[_MediaConstants.orientation] as int,
    size: map[_MediaConstants.size] as int,
  );
}