Media class

Constructors

Media(dynamic id, dynamic typeInt, dynamic width, dynamic height, Future<Uint8List?> thumbdata, {Crop? crop})

Properties

completer Completer?
getter/setter pair
createDateSecond int?
The create time in unix timestamp of the asset.
finalinherited
createDateTime DateTime
The create time of the asset in DateTime.
no setterinherited
crop Crop?
getter/setter pair
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
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
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
relativePath String?
The relative path abstraction of the asset.
finalinherited
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
thumbdata Future<Uint8List?>
getter/setter pair
thumbnailData Future<Uint8List?>
Obtain the thumbnail data with PMConstants.vDefaultThumbnailSize size of the asset, typically use it for preview displays.
no setterinherited
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.