gallery library

Photo library access.

Classes

MethodChannelGalleryBackend
Default XGalleryBackend — dispatches to native code via the ux/gallery method channel. Public so test code can reinstall it after swapping to a fake.
XAlbum
A user-visible album / collection in the system photo library (PHAssetCollection on Apple, MediaStore.Bucket on Android).
XAsset
A single asset (photo or video) in the system library (PHAsset / ContentResolver row).
XAssetThumbnail
Cell-sized thumbnail bytes ready for Image.memory. Backed by PHCachingImageManager on Apple and MediaStore.Thumbnails on 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/gallery method channel; tests substitute their own (see ux/lib/testing.dart's FakeXGalleryBackend).

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 PlatformException instead.