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, @Deprecated('Use assetCountAsync instead. This will be removed in 3.0.0') int assetCount = 0, int albumType = 1, DateTime? lastModified, RequestType type = RequestType.common, bool isAll = false, PMFilter? filterOption, PMDarwinAssetCollectionSubtype? darwinSubtype, PMDarwinAssetCollectionType? darwinType})
Properties
- albumType → int
-
The type of the album.
final
- assetCount → int
-
Total assets count of the album.
final
-
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.
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
- 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}) → 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
andend
. -
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.