Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ that can be found in the LICENSE file. -->
**Fixes**

- Refactor drag selection to work across all pages globally.
- Fix "Bad state: No element" crash in `onAssetsChanged` when paths list is empty.

## 10.0.0

Expand Down
3 changes: 3 additions & 0 deletions lib/src/delegates/asset_picker_builder_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,9 @@ class DefaultAssetPickerBuilderDelegate<T extends DefaultAssetPickerProvider>
}

await provider.getPaths(keepPreviousCount: true);
if (provider.paths.isEmpty) {
return;
}
provider.currentPath = provider.paths.first;
final currentWrapper = provider.currentPath;
if (currentWrapper != null) {
Expand Down