gallery library
Photo library access.
Classes
- MethodChannelGalleryBackend
-
Default XGalleryBackend — dispatches to native code via the
ux/gallerymethod channel. Public so test code can reinstall it after swapping to a fake. - XAlbum
-
A user-visible album / collection in the system photo library
(
PHAssetCollectionon Apple,MediaStore.Bucketon Android). - XAsset
-
A single asset (photo or video) in the system library
(
PHAsset/ContentResolverrow). - XAssetThumbnail
-
Cell-sized thumbnail bytes ready for
Image.memory. Backed byPHCachingImageManageron Apple andMediaStore.Thumbnailson Android. - XGallery
- Static facade for the system photo library. All state lives in the platform; this class is a thin Dart-side wrapper that dispatches into backend.
- XGalleryBackend
-
Backend contract that XGallery dispatches into. The default
implementation calls into native code via the
ux/gallerymethod channel; tests substitute their own (seeux/lib/testing.dart'sFakeXGalleryBackend).
Enums
- XAssetKind
- What kind of media an asset holds.
- XGalleryPermission
- Authorisation state of the system photo library.
- XGallerySaveStatus
-
Outcome of XGallery.saveToLibrary. denied means the user refused
(or previously refused) the add-to-library permission — route them to
XGallery.openSettings. Hard failures (unreadable source file, library
write error) throw a
PlatformExceptioninstead.