From dc111d8b30690295f968d0d791db6544a39d1907 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Mon, 2 Jan 2023 22:50:43 +0530 Subject: [PATCH] Issue #8 Fixed, Multiple widgets used the same GlobalKey Release 0.0.8 --- CHANGELOG.md | 3 +++ lib/src/multi_image_picker_view.dart | 3 +-- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 821abd6..cdb8d09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.0.8 +- Fixed issue: "Multiple widgets used the same GlobalKey" + ## 0.0.7 - Added support for default images 🖼️ (pre selected images) - Solved white flash 🔦 problem occurs on add/remove image diff --git a/lib/src/multi_image_picker_view.dart b/lib/src/multi_image_picker_view.dart index c6d5905..bfdfa9c 100644 --- a/lib/src/multi_image_picker_view.dart +++ b/lib/src/multi_image_picker_view.dart @@ -44,7 +44,6 @@ class MultiImagePickerView extends StatefulWidget { class _MultiImagePickerViewState extends State { late ScrollController scrollController; final gridViewKey = GlobalKey(); - final selectorKey = GlobalKey(); @override void initState() { @@ -98,7 +97,7 @@ class _MultiImagePickerViewState extends State { ); } final selector = SizedBox( - key: selectorKey, + key: const Key("selector"), child: widget.addMoreBuilder != null ? widget.addMoreBuilder!(context, _pickImages) : Container( diff --git a/pubspec.yaml b/pubspec.yaml index ad44a21..afc4611 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: multi_image_picker_view description: A complete widget which can easily pick multiple images from device and display them in UI. Also picked image can be re-ordered and removed easily. -version: 0.0.7 +version: 0.0.8 homepage: https://github.com/shubham-gupta-16/multi_image_picker_view repository: https://github.com/shubham-gupta-16/multi_image_picker_view issue_tracker: https://github.com/shubham-gupta-16/multi_image_picker_view/issues