AssetPathEntity class

The abstraction of albums and folders. It represent a bucket in the MediaStore on Android, and the PHAssetCollection object on iOS/macOS.

Annotations

Constructors

AssetPathEntity({required String id, required String name, int albumType = 1, DateTime? lastModified, RequestType type = RequestType.common, bool isAll = false, PMFilter? filterOption, @Deprecated('Use `albumTypeEx.darwin.type` instead. ' 'This feature was deprecated after v3.1.0') PMDarwinAssetCollectionSubtype? darwinSubtype, @Deprecated('Use `albumTypeEx.darwin.subtype` instead. ' 'This feature was deprecated after v3.1.0') PMDarwinAssetCollectionType? darwinType, AlbumType? albumTypeEx})

Properties

albumType → int
The type of the album.
final
albumTypeEx → AlbumType?
The extra information of the album type.
final
assetCountAsync → Future<int>
Total assets count of the path with the asynchronized getter.
no setter
darwin → DarwinAssetPath
A Darwin (iOS/macOS) only namespace of PhotoKit reads for this path.
no setter
darwinSubtype → PMDarwinAssetCollectionSubtype?
The darwin collection subtype, in android, the value is always null.
final
darwinType → PMDarwinAssetCollectionType?
The darwin collection type, in android, the value is always null.
final
filterOption → PMFilter?
The collection of filter options of the album.
final
hashCode → int
The hash code for this object.
no setteroverride
id → String
The ID of the album (asset collection).
final
isAll → bool
Whether the album contains all assets.
final
lastModified → DateTime?
The latest modification date of the album.
final
name → String
The name of the album.
final
relativePathAsync → Future<String?>
Get the relative path of the album asynchronously.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → RequestType
The value used internally by the user. Used to indicate the value that should be available inside the path. The RequestType of the album.
final

Methods

copyWith({String? id, String? name, int? albumType = 1, DateTime? lastModified, RequestType? type, bool? isAll, PMFilter? filterOption, PMDarwinAssetCollectionType? darwinType, PMDarwinAssetCollectionSubtype? darwinSubtype, AlbumType? albumTypeEx}) → AssetPathEntity
fetchPathProperties({FilterOptionGroup? filterOptionGroup}) → Future<AssetPathEntity?>
Obtain a new AssetPathEntity from the current one with refreshed properties.
getAssetListPaged({required int page, required int size, RequestType? type}) → Future<List<AssetEntity>>
Entity list with pagination support.
getAssetListRange({required int start, required int end, RequestType? type}) → Future<List<AssetEntity>>
Getting assets in range using start and end.
getSubPathList() → Future<List<AssetPathEntity>>
Request subpaths for the album.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
obtainForNewProperties({bool maxDateTimeToNow = true}) → Future<AssetPathEntity>
Call this method to obtain new path entity.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromId(String id, {FilterOptionGroup? filterOption, RequestType type = RequestType.common, int albumType = 1}) → Future<AssetPathEntity>
Obtain an entity from ID.
obtainPathFromProperties({required String id, int albumType = 1, RequestType type = RequestType.common, PMFilter? optionGroup, bool maxDateTimeToNow = true}) → Future<AssetPathEntity>
Call this method to obtain new path entity.