This document gathered all breaking changes and migrations requirement between major versions.
API documentation:
AssetPickerBuilderDelegate
:AssetPickerViewerBuilderDelegate
:AssetPickerProvider
:AssetPickerViewerProvider
:AssetsPickerTextDelegate
:
If you didn't extend AssetPickerBuilderDelegate
or AssetTextDelegate
to build delegates on your own,
you can stop reading.
- User who extended
AssetPickerBuilderDelegate
needs to update the subclass with the latest changes. AssetsPickerTextDelegate
is not abstract anymore.
New arguments:
PermissionState initialPermission
: The intention of this change is to be capable with various ofPermissionState
. If your delegate didn't require a permission check, you can passPermissionState.authorized
directly.keepScrollOffset
: To hold the provider and delegate without disposing, and keep the scroll offset with the last picking.
Other changes:
assetsGridBuilder
is not implemented by default.- The
findChildIndexBuilder
andassetsGridItemCount
methods have new signature. They require calculating placeholders count on iOS/macOS by default.
- Added the
isDisplayingDetail
notifier. - Added double tap animation series of fields.
- This delegate is now a normal class with Chinese language implemented by default,
which makes
DefaultAssetsPickerTextDelegate
removed. So if you used to useDefaultAssetsPickerTextDelegate()
, useAssetsPickerTextDelegate()
instead.
- The
switchPath
method has a different signature:
Before:
void switchPath(Path pathEntity);
After:
Future<void> switchPath([P? pathEntity]);
SortPathDelegate
accepts a generic type Path
now, and the type will be delivered to the sort
method.
If you only use the AssetPicker.pickAssets
and AssetEntityImageProvider
,
didn't use AssetPickerViewer
, AssetPickerProvider
, or other components separately,
you can stop reading.
The AssetPicker
and the AssetPickerViewer
are only a builder since 5.x,
all widgets construct were moved to AssetPickerBuilderDelegate
and AssetPickerViewerBuilderDelegate
,
and these delegates are both abstract.
By splitting delegates, now you can build your own picker with custom types, style, and widgets.
For how to implement a custom picker, see the example's custom page for more implementation details.
-
If you have ever use
AssetPickerViewer.pushToViewer
, the propertiesassets
has changed topreviewAssets
. -
If you have extended an
AssetPickerProvider
orAssetPickerViewerProvider
, it now requires you to pass generic typeAsset
andPath
, and handle the entities on your own.