Skip to content

Commit f07fb69

Browse files
committed
🐛 Fix limited resources refresh issue
Related to #198 .
1 parent 535a5df commit f07fb69

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/src/widget/asset_picker.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,16 @@ class AssetPickerState<Asset, Path> extends State<AssetPicker<Asset, Path>>
274274
if (!widget.builder.isPermissionLimited) {
275275
return;
276276
}
277-
await widget.builder.provider.getAssetPathList();
278277
if (widget.builder.provider.currentPathEntity != null) {
279-
await widget.builder.provider.switchPath();
278+
final Path? _currentPathEntity =
279+
widget.builder.provider.currentPathEntity;
280+
if (_currentPathEntity is AssetPathEntity) {
281+
await _currentPathEntity.refreshPathProperties();
282+
}
283+
await widget.builder.provider.switchPath(_currentPathEntity);
284+
if (mounted) {
285+
setState(() {});
286+
}
280287
}
281288
}
282289

0 commit comments

Comments
 (0)