requestGallery method

Future<bool> requestGallery()

Requests access to the photo/gallery library.

On Android 13+ this maps to the granular photos permission; older Android versions and iOS fall back to the appropriate equivalent handled by permission_handler.

Implementation

Future<bool> requestGallery() async {
  if (await _request(Permission.photos)) return true;
  // Fallback for older Android versions that still use storage.
  return _request(Permission.storage);
}