adaptive_media_picker 1.2.0 copy "adaptive_media_picker: ^1.2.0" to clipboard
adaptive_media_picker: ^1.2.0 copied to clipboard

Adaptive Flutter media picker for images & videos with smart permissions, limited access UI, and cross-platform support (Android, iOS, Web, Desktop).

1.2.0 — 2026-08-26 #

Google Play Photo and Video Permissions policy compliance.

  • Android gallery picks no longer request any runtime media permission. Picking already went through the system picker (image_picker), which grants per-item access without READ_MEDIA_IMAGES / READ_MEDIA_VIDEO / READ_EXTERNAL_STORAGE. Requesting the permission anyway forced host apps to declare it in their manifest — which Google Play now rejects for apps with one-time or infrequent media use. Host apps can (and should) remove those permissions from their AndroidManifest.xml.
  • Android gallery picks now opt in to the Android photo picker (useAndroidPhotoPicker = true on image_picker's Android platform implementation), falling back to the legacy GET_CONTENT picker on devices without it. Note this flag is global to image_picker, so other gallery picks in the host app made through image_picker will also use the photo picker.
  • Camera picks still request CAMERA (and RECORD_AUDIO for video) as before. iOS, web, and desktop behavior is unchanged.
  • Removed the device_info_plus dependency (no longer needed); added image_picker_android and image_picker_platform_interface.

1.1.1 — 2026-08-20 #

Bug fix.

  • Fixed several try/catch blocks in adaptive_media_picker_impl.dart and image_cropper_impl.dart that returned a Future without await, which meant the catch couldn't actually catch errors thrown by that future — they'd propagate as unhandled Future rejections instead.

1.1.0 — 2026-08-18 #

Configurable default crop aspect ratio.

  • Added PickOptions.cropAspectRatio (CropAspectRatioOption?) to set the ratio the cropper opens with (square, ratio3x2, ratio4x3, ratio5x4, ratio7x5, ratio16x9, or original). Defaults to null, which preserves the previous behavior (square initial ratio on Android, free-form on iOS/Web).
  • Added PickOptions.lockCropAspectRatio to lock the crop box to cropAspectRatio on Android/iOS (no effect on Web — the image_cropper web backend can't lock the ratio, only hint at an initial one).
  • Non-breaking: both fields are optional and additive.

1.0.2 — 2026-08-17 #

WASM compatibility fix.

  • Removed photo_manager imports from web/WASM-reachable code (limited_access_picker_stub.dart and adaptive_media_picker_impl.dart). The stub's LimitedAccessPicker.show now returns Future<List<dynamic>?> instead of naming AssetEntity, which transitively pulled dart:io into web builds and made pub.dev flag the package as not WASM-compatible. The native (dart:io) implementation is unchanged and still returns List<AssetEntity>.

1.0.1 — 2026-08-17 #

SDK constraint fix.

  • Environment
    • Raised minimum SDKs to Dart 3.10 / Flutter 3.38.1 — required by image_picker 1.2.3 and device_info_plus 13. The previous constraints (Dart 3.4 / Flutter 3.13) could not actually resolve the 1.0.0 dependencies.
  • CI
    • Bumped the CI Flutter version to 3.44.9 (matching the .fvmrc pin) so dependency resolution succeeds on CI

1.0.0 — 2026-08-17 #

First stable release: dependency upgrades, accurate permission states, and WASM compatibility.

  • Dependencies
    • Updated smart_permission from ^0.0.3 to ^1.0.1
    • Updated image_cropper from ^11.0.0 to ^12.2.1
    • Updated device_info_plus from ^12.2.0 to ^13.2.0
    • Updated photo_manager from ^3.7.1 to ^3.12.0
    • Updated image_picker from ^1.2.1 to ^1.2.3
    • Android apps must now build with compileSdk = 37 (required by permission_handler 13 via smart_permission); see README
  • Permission handling
    • Migrated to smart_permission's result API: limited access and permanently-denied states are now reported accurately by the OS instead of being inferred from the device's photo library contents. Full-access users now get the native picker instead of the in-package limited-access sheet.
    • PermissionResolution.permanentlyDenied is now populated correctly
    • The "Open Settings" flow (dialog, opening Settings, waiting for return, re-checking) is handled by smart_permission; the package no longer shows its own duplicate settings dialog. PickOptions.settingsDialogTitle, settingsDialogMessage, settingsButtonLabel, and cancelButtonLabel are forwarded to those dialogs.
    • Deprecated PickOptions.showOpenSettingsDialog (no longer read)
    • Android 13+: video picks now request only READ_MEDIA_VIDEO (previously also prompted for images)
  • Results
    • Added PickError.permissionDenied; permission failures no longer surface as PickError.unknown
    • PickResultMultiple now exposes error (parity with PickResultSingle)
    • Fixed: crop cancellation on non-web platforms now sets PickError.cropCanceled (previously always null)
  • Web
    • Conditional imports now use dart.library.js_interop instead of dart.library.html for WebAssembly (WASM) compatibility

0.0.10 — 2025-11-14 #

Permission handling migration and dependency updates.

  • Breaking Changes
    • Replaced permission_handler with smart_permission package
    • PermissionManager.ensureMediaPermission now requires BuildContext? parameter
  • Dependencies
    • Updated device_info_plus from ^12.1.0 to ^12.2.0
    • Updated image_picker from ^1.2.0 to ^1.2.1
    • Replaced permission_handler: ^12.0.1 with smart_permission: ^0.0.3
  • Permission Manager
    • Migrated to smart_permission API for better permission handling UX
    • Added context-aware permission requests with proper mounted checks
    • Improved Android granular media permissions handling (API 33+)
    • Enhanced iOS Photos permission flow with limited access detection
  • Documentation
    • Added iOS Podfile configuration section with permission setup instructions
    • Updated README with Podfile post_install configuration for Camera, Microphone, and Photos permissions

0.0.9 — 2025-10-13 #

Dart formatting only (no functional changes).

  • Formatting
    • Ran dart format with default settings across lib/, example/, and test/
    • Ensures pana/pub.dev formatter compliance

0.0.8 — 2025-01-13 #

Web image cropper bug fixes and improvements.

  • Web Image Cropper
    • Fixed "Type 'Brightness' not found" error
    • Added input validation and better error handling
    • Enhanced debugging with detailed logging

0.0.7 — 2025-10-09 #

Theming support and example toggle.

  • Options
    • Added PickOptions.themeBrightness and PickOptions.primaryColor to control UI theme for the limited-access sheet and cropper
  • Limited-access UI
    • Bottom sheet now uses app theme by default; can be overridden via PickOptions
  • Cropping (Android/iOS/Web)
    • Android: AndroidUiSettings colors now derive from theme (toolbar, controls, dim layer, grid/frame)
    • Web: forwards theme context; respects app theme for dialog/page
  • Example
    • Added light/dark theme switch and wired theme overrides into picker calls
  • Docs
    • README updated with theming section and usage

0.0.6 — 2025-10-06 #

Non-breaking DX improvements: typed errors and richer result metadata.

  • Results
    • PickResultSingle now exposes metadata: PickMetadata with:
      • cropApplied, originalSize, and finalSize (when measurable)
    • Added error: PickError? to disambiguate empty results:
      • canceled (user canceled), cropCanceled, io, unknown
  • Options
    • PickOptions.logTag (optional) for easier internal tracing in debug logs
  • Behavior
    • Populates originalSize and finalSize for single-image picks (incl. cropped)
    • Sets PickError.canceled when selection dialogs return null/empty
    • Sets PickError.cropCanceled when crop UI is dismissed without saving
  • Analyzer
    • Guarded context across async gaps where size decoding/crop occurs

0.0.5 — 2025-10-06 #

Cropping feature finalized with platform guards, stubs, and docs updates:

  • Feature: Optional cropping for single image picks (PickOptions.wantToCrop)
    • Supported on Android, iOS, Web
    • No-op on Desktop (macOS, Windows, Linux) — returns original image
  • Limited access: Cropping now works when selecting from the limited-access picker (single image)
  • Android: Ensure UCropActivity is declared in app manifest (documented)
  • Web: Uses image_cropper (cropperjs) with dialog style and fixed size; requires including CSS/JS in index.html
  • Internals:
    • Introduced PlatformImageCropper with conditional imports for mobile/web and a desktop stub
    • Removed direct ImageCropper usage from the picker; unified call sites
    • Fixed analyzer issues: context guards (mounted checks), removed custom aspect ratio type

0.0.4 — 2025-09-23 #

Analyzer and formatting cleanups; no API changes:

  • Lints
    • Resolved "Dangling library doc comment" by adjusting comments in lib/adaptive_media_picker.dart
    • Ensured analyzer passes with no issues on the library entrypoint
  • Formatting
    • Ran dart format across the repository (lib and example) for pub.dev checks
  • Tests
    • Verified package and example tests pass under FVM
  • Public API
    • No functional or breaking changes

0.0.3 — 2025-09-23 #

Docs and README polish; tests and formatting:

  • Docs
    • Added dartdoc across public API (picker, models, limited-access UI)
    • Removed duplicated/ambiguous comments for clearer generated docs
  • Public API
    • Cleaned exports in adaptive_media_picker.dart (no breaking changes)
  • Tests & formatting
    • Updated example test to use the public entrypoint
    • Ran dart format on lib to satisfy pub.dev checks
  • Internals
    • Minor refactors and comments only; no runtime behavior changes

0.0.2 — 2025-09-19 #

Refactor, clearer API, and docs/readiness improvements:

  • New concrete result types returned directly:
    • PickResultSingle { item, permissionResolution }
    • PickResultMultiple { items, permissionResolution }
  • New public methods:
    • pickImage (single image), pickVideo (single video), pickMultiImage (multi images)
  • PickOptions simplified:
    • Removed allowMultiple and mediaType
    • maxImages now applies only to images and is enforced cross-platform
  • Limited access bottom sheet UX:
    • Closes by default after Manage/Open Settings when no items are visible
  • Codebase reorg:
    • src/core/ (models), src/platform/ (permission manager), src/ui/ (limited picker)
  • Web compatibility: removed dart:io from library code
  • README overhauled (quick start, use cases, API overview)
  • Tests updated; FVM test run green

0.0.1 — 2025-09-18 #

Initial release

  • Adaptive media picker with unified API across platforms (Android, iOS, Web, Desktop).
  • Permission handling via permission_handler, including:
    • Android 13+ granular Photos/Videos permissions and limited access detection.
    • iOS Photos limited/full access handling with settings prompt.
    • Desktop: treated as granted; relies on system file dialogs.
  • Limited access flow with built-in bottom-sheet picker powered by photo_manager.
  • Image/video picking backed by image_picker with desktop/web camera fallback to gallery.
  • Options for multi-select, max image count, and image quality/size hints.
  • Re-exports ImageSource for consumer convenience.
  • Example app demonstrating common flows and UI states.
  • Test suite (package and example) and FVM compatibility.
37
likes
150
points
192
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Adaptive Flutter media picker for images & videos with smart permissions, limited access UI, and cross-platform support (Android, iOS, Web, Desktop).

Repository (GitHub)
View/report issues

Topics

#image-picker #video-picker #camera #gallery #file-selection

License

(pending) (license)

Dependencies

flutter, image_cropper, image_picker, image_picker_android, image_picker_platform_interface, photo_manager, smart_permission

More

Packages that depend on adaptive_media_picker