AssetPathEntity class

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



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})


albumType int
The type of the album.
albumTypeEx AlbumType?
The extra information of the album type.
assetCountAsync Future<int>
Total assets count of the path with the asynchronized getter.
no setter
darwinSubtype PMDarwinAssetCollectionSubtype?
The darwin collection subtype, in android, the value is always null.
darwinType PMDarwinAssetCollectionType?
The darwin collection type, in android, the value is always null.
filterOption PMFilter
The collection of filter options of the album.
hashCode int
The hash code for this object.
no setteroverride
id String
The ID of the album (asset collection).
isAll bool
Whether the album contains all assets.
lastModified DateTime?
The latest modification date of the album.
name String
The name of the album.
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.


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}) Future<List<AssetEntity>>
Entity list with pagination support.
getAssetListRange({required int start, required int end}) 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.
obtainForNewProperties({bool maxDateTimeToNow = true}) Future<AssetPathEntity>
Call this method to obtain new path entity.
toString() String
A string representation of this object.


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

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.