Flutter 3.22 release mode issue
When I run the example with Flutter 3.22 in release mode I can take/choose multiple images but only the last is shown. When I delete the last image the previous image is shown. It's like the grid is collapsed to a stack. With the latest flutter 3.19 it works as expected.
In this test I took 3 images, only one image is shown:
Hi @simonmoser-bluesource,
I just investigated the issue and found that this issue is also with the flutter_reorderable_grid_view: ^4.0.0 package as well.
Since multi_image_picker_view is using flutter_reorderable_grid_view for reordering grid view, it happens here as well.
I raised an issue with at flutter_reorderable_grid_view repository:
https://github.com/karvulf/flutter-reorderable-grid-view/issues/105
Unfortunately, that repository is not very active (the last release was 16 months ago). I think I should try any alternative for this.
@shubham-gupta-16 thanks for looking into this issue. Hopefully 5.0.0 will be released soon.
flutter_reorderable_grid_view released v5.0.0. We need to update this version in multi_image_pickder_view.
Please release new version with flutter_reorderable_grid_viewv.5.0.1 - this will fix this issue
I can confirm that the issue is gone with flutter_reorderable_grid_viewv.5.0.1
Some refactoring is required - e.g. the onReorder-method of ReorderableBuilder (in multi_image_picker_view.dart) might look something like this:
onReorder: (ReorderedListFunction reorderedListFunction) {
final List<ImageFile> reorderedList =
reorderedListFunction(widget.controller.images.toList()) as List<ImageFile>;
widget.controller.setImageList(reorderedList);
},
MultiImagePickerController does not need a reOrderImages-method anymore. I would suggest a simple method to pass the reordered list to the controller
// in MultiImagePickerController:
void setImageList(List<ImageFile> images) {
_images.clear();
_images = images;
notifyListeners();
}
I checked, but 5.0.1 doesn't solve the issue.
It happens with other reorderable plugins as well, i.e. reorderable_grid_view.
I think flutter has made some major changes in overlay handling in version 3.22
I checked it on Flutter version: 3.24.1 and it works fine. It seems like the issue was with the flutter version: 3.22.*.
Closing this issue as there is nothing to do with this library.