Skip to content

Commit

Permalink
Merge pull request #12
Browse files Browse the repository at this point in the history
Remove all images (clear selection)
  • Loading branch information
shubham16g authored Jan 17, 2023
2 parents df42cea + 215db08 commit 80da11c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.0.10
- Remove all images (clear selection)

## 0.0.9
- addButtonTitle optional field added
- addMoreButtonTitle optional field added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ controller.hasNoImages; // return bool
controller.maxImages; // return maxImages
controller.allowedImageTypes; // return allowedImageTypes
controller.removeImage(imageFile); // remove image from the images
controller.clearImages(); // remove all images (clear selection)
controller.reOrderImage(oldIndex, newIndex); // reorder the image
```

Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.9"
version: "0.0.10"
path:
dependency: transitive
description:
Expand Down
6 changes: 6 additions & 0 deletions lib/src/multi_image_picker_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,10 @@ class MultiImagePickerController with ChangeNotifier {
_images.remove(imageFile);
notifyListeners();
}

/// Remove all selected images and show default UI
void clearImages() {
_images.clear();
notifyListeners();
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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.9
version: 0.0.10
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
Expand Down

0 comments on commit 80da11c

Please sign in to comment.