File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
example/lib/customs/pickers Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -703,9 +703,7 @@ class FileAssetPickerBuilder
703
703
) {
704
704
int currentIndex = index;
705
705
706
- if (prependSpecialItems.isNotEmpty) {
707
- currentIndex = index - prependSpecialItems.length;
708
- }
706
+ currentIndex = index - prependSpecialItems.length;
709
707
710
708
final File asset = currentAssets.elementAt (currentIndex);
711
709
final Widget builder = imageAndVideoItemBuilder (
Original file line number Diff line number Diff line change @@ -1440,9 +1440,7 @@ class DefaultAssetPickerBuilderDelegate
1440
1440
1441
1441
int currentIndex = index;
1442
1442
1443
- if (prepandSpecialItemModels.isNotEmpty) {
1444
- currentIndex = index - prepandSpecialItemModels.length;
1445
- }
1443
+ currentIndex = index - prepandSpecialItemModels.length;
1446
1444
1447
1445
if (currentPathEntity == null ) {
1448
1446
return const SizedBox .shrink ();
@@ -1573,9 +1571,8 @@ class DefaultAssetPickerBuilderDelegate
1573
1571
}) {
1574
1572
int index = assets.indexWhere ((AssetEntity e) => e.id == id);
1575
1573
1576
- if (prependSpecialItems.isNotEmpty) {
1577
- index += prependSpecialItems.length;
1578
- }
1574
+ index += prependSpecialItems.length;
1575
+
1579
1576
index += placeholderCount;
1580
1577
return index;
1581
1578
}
You can’t perform that action at this time.
0 commit comments