GallerySource class abstract

Access to existing photos and videos.

All methods throw StoryException on failure.

Constructors

GallerySource()

Properties

changes → Stream<void>
Fires when the library changes (new photo, selection changed).
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportsGrid → bool
Whether this source can list assets for an in-app grid. false means only pickWithSystemPicker is available.
no setter

Methods

albums({required bool photos, required bool videos}) → Future<List<GalleryAlbum>>
Albums, "all recent" first.
assets(GalleryAlbum album, {required int page, int pageSize = 60}) → Future<List<GalleryAsset>>
One page of an album's assets, newest first.
checkAccess() → Future<GalleryAccess>
Current access without prompting.
dispose() → Future<void>
Releases resources.
manageLimitedSelection() → Future<void>
Lets the user change the limited selection.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickWithSystemPicker({required bool photos, required bool videos}) → Future<PickedMedia?>
Opens the system picker; null when the user cancels.
requestAccess() → Future<GalleryAccess>
Prompts for access if needed.
resolve(GalleryAsset asset, {void onProgress(double progress)?}) → Future<PickedMedia>
Makes asset available as a local file (downloading from iCloud when needed). onProgress receives 0–1.
thumbnail(GalleryAsset asset, {int size = 256}) → ImageProvider<Object>
Square thumbnail of asset.
toString() → String
A string representation of this object.
inherited

Operators

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