ExtendedAssetEntity<T> class

Inheritance
Available extensions

Constructors

ExtendedAssetEntity({Uint8List? thumbnailDataAsync, T? renovated, File? fileAsync, required String id, required int typeInt, required int width, required int height, int duration = 0, int orientation = 0, bool isFavorite = false, String? title, int? createDateSecond, int? modifiedDateSecond, String? relativePath, double? latitude, double? longitude, String? mimeType, int subtype = 0})
const
ExtendedAssetEntity.fromFile({required File file, int width = 0, int height = 0, required AssetType assetType})
ExtendedAssetEntity.fromPreviewed({required String? previewed, int width = 0, int height = 0, required AssetType assetType})

Properties

createDateSecond int?
The create time in unix timestamp of the asset.
finalinherited
createDateTime DateTime
The create time of the asset in DateTime.
no setterinherited
duration int
The duration of the asset, but in different units.
finalinherited
exists Future<bool>
Check whether the asset has been deleted.
no setterinherited
file Future<File?>
Obtain the compressed file of the asset.
no setterinherited
fileAsync File?
file
final
fileWithSubtype Future<File?>
Obtain the compressed file of the asset with subtype.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
height int
The height of the asset.
finalinherited
id String
The ID of the asset.
finalinherited
isFavorite bool
Whether the asset is favorite on the device.
finalinherited
isLivePhoto bool
Whether the asset is a live photo. Only valid on iOS/macOS.
no setterinherited
isLocalData bool
final
latitude double?
Latitude value of the location when shooting.
no setterinherited
longitude double?
Latitude value of the location when shooting.
no setterinherited
mimeType String?
The mime type of the asset.
finalinherited
mimeTypeAsync Future<String?>
Get the mime type async.
no setterinherited
modifiedDateSecond int?
The modified time in unix timestamp of the asset.
finalinherited
modifiedDateTime DateTime
The modified time of the asset in DateTime.
no setterinherited
orientatedHeight int
no setterinherited
orientatedSize Size
no setterinherited
orientatedWidth int
no setterinherited
orientation int
The orientation of the asset.
finalinherited
originBytes Future<Uint8List?>
Obtain the raw data of the asset.
no setterinherited
originFile Future<File?>
Obtain the original file that contain all EXIF information.
no setterinherited
originFileWithSubtype Future<File?>
Obtain the origin file with subtype.
no setterinherited
previewed String?
previewed 主要用于复显 可使用url 或者 assetPath
final
realValue → dynamic
no setter
realValueStr String?
no setter
relativePath String?
The relative path abstraction of the asset.
finalinherited
renovated → T?
对选中的资源文件重新编辑,例如 压缩 裁剪 上传
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
The Size for the asset.
no setterinherited
subtype int
The subtype of the asset.
finalinherited
thumbnailData Future<Uint8List?>
Obtain the thumbnail data with PMConstants.vDefaultThumbnailSize size of the asset, typically use it for preview displays.
no setterinherited
thumbnailDataAsync Uint8List?
原始缩略图数据 bytes
final
title String?
The title field of the asset.
finalinherited
titleAsync Future<String>
  • Android: MediaStore.MediaColumns.DISPLAY_NAME.
  • iOS/macOS: PHAssetResource.originalFilename.
  • no setterinherited
    titleAsyncWithSubtype Future<String>
  • Android: MediaStore.MediaColumns.DISPLAY_NAME.
  • iOS/macOS: PHAssetResource.originalFilename.
  • no setterinherited
    type AssetType
    The type of the asset.
    no setterinherited
    typeInt int
    The type value of the type.
    finalinherited
    videoDuration Duration
    The video duration in seconds.
    no setterinherited
    width int
    The width of the asset.
    finalinherited

    Methods

    copyWith({String? id, int? typeInt, int? width, int? height, int? duration, int? orientation, bool? isFavorite, String? title, int? createDateSecond, int? modifiedDateSecond, String? relativePath, double? latitude, double? longitude, String? mimeType, int? subtype}) AssetEntity
    inherited
    getMediaUrl() Future<String?>
    Provide regular URL for players. Only available for audios and videos.
    inherited
    isLocallyAvailable({bool isOrigin = false}) Future<bool>
    Whether this asset is locally available.
    inherited
    latlngAsync() Future<LatLng>
    Obtain latitude and longitude.
    inherited
    loadFile({bool isOrigin = true, bool withSubtype = false, PMProgressHandler? progressHandler}) Future<File?>
    Obtain file of the asset with a PMProgressHandler.
    inherited
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    obtainForNewProperties() Future<AssetEntity?>
    Refresh properties for the current asset and return a new object.
    inherited
    thumbnailDataWithOption(ThumbnailOption option, {PMProgressHandler? progressHandler}) Future<Uint8List?>
    Obtain the thumbnail data with the given customized ThumbnailOption.
    inherited
    thumbnailDataWithSize(ThumbnailSize size, {ThumbnailFormat format = ThumbnailFormat.jpeg, int quality = 100, PMProgressHandler? progressHandler, int frame = 0}) Future<Uint8List?>
    Obtain the thumbnail data with the given width and height of the asset.
    inherited
    toString() String
    A string representation of this object.
    inherited

    Operators

    operator ==(Object other) bool
    The equality operator.
    inherited