v3.10.0
What's Changed
Features
- Add an optional
typeparameter toAssetPathEntity.getAssetListPagedandAssetPathEntity.getAssetListRangeso callers can filter to a specificRequestTypewithin a single album (e.g. read videos out of acommonalbum) without constructing a newAssetPathEntity. Defaults to the album's owntypewhen omitted. - Add Darwin (iOS/macOS) only namespaced accessors
AssetEntity.darwinandAssetPathEntity.darwinthat group PhotoKit-specific reads without bloating the shared entity classes:asset.darwin.cloudIdentifierand the batchPhotoManager.plugin.getCloudIdentifiersresolve stable cross-device cloud identifiers (iOS 15+/macOS 12+).asset.darwin.hasAdjustmentsreports whether an asset has edits, andasset.darwin.getBaseFile()exports the unedited base file.asset.darwin.getAdjustmentData()exports the raw AAE adjustment (edit-history) data backing an asset's edits, so callers can access the original resource, the edit metadata, and the rendered result separately (non-destructive editing).path.darwin.getParentPathList()returns the parent folders containing an album or folder.
- Add
updateCreationDatetoPhotoManager.editor.darwinandPhotoManager.editor.androidfor modifying an asset's creation date after it has been saved.- On iOS/macOS: updates the
PHAsset.creationDateproperty. - On Android Q (API 29)+: updates the MediaStore
DATE_TAKENfield; unsupported on API 28 and below.
- On iOS/macOS: updates the
- Add
PhotoManager.canManageMedia()andPhotoManager.requestManageMedia()for the Android 12 (API 31+)MANAGE_MEDIAspecial permission.
Improvements
- Migrate the Android plugin to Flutter's built-in Kotlin integration with a compatibility fallback for projects that still require
kotlin-android, without changing the package's public Flutter or Dart version constraints. - Fix the Android plugin
namespacetocom.fluttercandies.photo_managerso it matches the plugin package and Kotlin sources.
Fixes
- Fix Android
PlatformExceptions fromIllegalArgumentException: Volume external_primary not foundby returning an empty cursor when MediaProvider reports the primary volume as unavailable, and guard the media-storeContentObserveragainst the same exception. - Fix Darwin
AssetEntity.originFilereturning the locally-downsampled proxy for iCloud + "Optimize iPhone Storage"-affected photos by preferringPHImageManagerwithHighQualityFormatoverwriteDataForAssetResourceon unedited raster primaries. - Fix Darwin
PhotoManager.editor.darwin.saveLivePhotoreturningPHPhotosErrorDomain (-1)when the caller-supplied image and video lacked the shared Live Photo pairing identifierPHAssetCreationRequestrequires. - Fix iOS 18+ raising
Unsupported fetch for asset collections with type 2 and subtype 2when navigating into the primary album, caused by an invalidSmartAlbum+AlbumRegularcombination in the recent-collection check. - Fix Darwin
AssetEntity.loadFile/originFilesporadically failing withPHPhotosErrorDomain (-1)for edited assets and Live Photos by walking multiplePHAssetResourcecandidates and falling back toPHImageManagerfor plain videos/images whenwriteDataForAssetResourceexhausts them. - Reduce built-in Kotlin migration warnings for supported project configurations while preserving legacy Flutter compatibility.
- Fix Darwin crashes when querying assets by local identifier by catching PhotoKit exceptions and returning safe fallback results instead of aborting the process.
- Fix the
AssetEntity.durationAPI docs to clarify that audio and video durations are returned in seconds across supported platforms, preserving the existing API behavior. - Fix Android 14+ limited permission photo selection not reflecting deselection in Flutter layer. When users modify their photo selection via
presentLimited(), the changes are now properly notified to the Flutter layer. - Fix delayed native deletion confirmation dialogs on iOS by elevating the dispatch queue priority of
deleteWithIds,removeInAlbum, anddeleteAlbumtoQOS_CLASS_USER_INITIATED. - Fix Android 14+ permission requests incorrectly short-circuiting when only part of the requested media access was already granted.
- Fix Android permission requests always asking for both image and video access regardless of
RequestType. The plugin now only requestsREAD_MEDIA_IMAGES/READ_MEDIA_VIDEOmatching the caller'sRequestType, so the Android 14+ system photo picker only shows the media types the app actually asked for. - Fix Darwin video durations being truncated instead of rounded, so
AssetEntity.durationmatches the system album display more closely. - Fix Darwin
getTitleAsyncreturning a null channel result by falling back to an empty string. - Fix Darwin Live Photo exports with an explicit
darwinFileType, restoring iOS conversions such as Live Photo MOV-to-MP4 output. - Fix Darwin image
loadFile(isOrigin: false)blocking the iOS UI thread by making the request asynchronous and moving JPEG file conversion off the main thread, allowingPMProgressHandlerupdates to arrive while loading. - Fix
presentLimited()on iOS resolving the presenting view controller through the deprecatedUIApplication.keyWindow, which can return the wrong window (or none) once an app adopts the UIScene life cycle. The plugin now prefers theFlutterViewControllerattached to its own engine and falls back to scanning the foreground-activeUIWindowScenefor the key window. - Fix
latitude/longitude/latLngbeing dropped whenever a coordinate component was exactly0.0(e.g. assets near the equator or prime meridian). Dart, Android, and iOS/macOS all used0.0as a "no location" sentinel;0.0is now treated as a valid coordinate, and the native platforms report the absence of location data as an explicitnullinstead. - Replace the internal
CC_MD5-based hash used to derive Darwin full-image cache filenames fromPHAsset.localIdentifierwithCC_SHA256, silencing the macOS 10.15+ deprecation warnings fromCommonCryptowithout changing observable behavior. Existing cached files under the plugin cache directory are re-created on first access after upgrade.