v3.8.0
What's Changed
Features
- Add Swift Package Manager support for iOS and macOS.
- Add
cancelTokenparameter toAssetEntity.loadFile. - Add
cancelAllRequestmethod toPhotoManager. - The
AssetEntity.getFileandAssetEntity.getOriginBytesmethods are public. - Add
relativePathAsyncgetter toAssetPathEntity. - Add iOS 18 smart album subtypes support:
smartAlbumSpatial- For spatial/3D photossmartAlbumProRes- For ProRes videossmartAlbumScreenRecordings- For screen recordingssmartAlbumReceipts- For receipts in the Utilities sectionsmartAlbumHandwriting- For handwriting in the Utilities sectionsmartAlbumIllustrations- For illustrations in the Utilities sectionsmartAlbumQRCodes- For QR codes in the Utilities section
- Add optional
latitude,longitude, andcreationDateparameters tosaveImage,saveImageWithPath, andsaveVideomethods.- On iOS: Sets location and creation date metadata for saved assets.
- On Android Q+: Sets DATE_TAKEN field and location metadata for saved assets.
- Add batch asset move functionality using
createWriteRequestAPI for Android 11+.
Improvements
- Remove implied
FilterOptionGroups when querying paths and assets. This fixes assets finding when they were created in the future. Some edge cases regarding performance drops caused by the complicated sort queries might also get fixed. - Add
PermissionState.isLimited.
Fixes
- Fix
type 'Null' is not a subtype of type 'Map<dynamic, dynamic>'error on Android when copying or moving assets fails.- Android now properly throws exceptions instead of returning null when
copyAssetToGalleryormoveAssetToGalleryoperations fail. - Dart side now handles null responses gracefully by throwing a
PlatformException.
- Android now properly throws exceptions instead of returning null when
- Fix PHImageManager crash on iOS by ensuring all PHImageManager/PHCachingImageManager methods are called on the main thread. This resolves race conditions and deadlocks when thumbnail operations are dispatched to QoS background queues.
- Fix EXC_BAD_ACCESS crash caused by accessing deallocated memory in async blocks on iOS.
- Fixed PHCachingImageManager methods:
fetchThumb,exportAssetToFile,fetchFullSizeImageFile. - Fixed PHAssetResourceManager methods:
fetchVideoResourceToFile,fetchOriginImageFile. - Fixed PHPhotoLibrary save methods:
saveImage,saveImageWithPath,saveVideo,saveLivePhoto.
- Fixed PHCachingImageManager methods:
- Fix
AssetEntity.latlngAsync()returning zero location for videos on Android by usingMediaMetadataRetrieverto extract location data from video files. - Fix nullability mismatch for
titleparameter insaveVideoandsaveImageWithPathmethods.
New Contributors
- @ColaFanta made their first contribution in https://github.com/fluttercandies/flutter_photo_manager/pull/1312
- @HubHive made their first contribution in https://github.com/fluttercandies/flutter_photo_manager/pull/1295
- @toyaji made their first contribution in https://github.com/fluttercandies/flutter_photo_manager/pull/1320
Full Changelog: https://github.com/fluttercandies/flutter_photo_manager/compare/v3.7.1...v3.8.0