Skip to content

Commit

Permalink
add addImage function to manually add ImageFile entries
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNancy authored and shubham16g committed Mar 1, 2023
1 parent 3eb81d5 commit 7e3fcb6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/src/multi_image_picker_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ class MultiImagePickerController with ChangeNotifier {
}
}

void addImage(ImageFile imageFile) {
_images.add(imageFile);
notifyListeners();
}

/// Manually re-order image, i.e. move image from one position to another position.
void reOrderImage(int oldIndex, int newIndex) {
final oldItem = _images.removeAt(oldIndex);
Expand Down

0 comments on commit 7e3fcb6

Please sign in to comment.