multi_image_picker_view icon indicating copy to clipboard operation
multi_image_picker_view copied to clipboard

how to get image added paths infinite as setstate is use how to get images path added or removed

Open sunil-singh-chaudhary opened this issue 1 year ago • 1 comments

bool _isSelectionToggled = false;

void toggleImageSelection(ImageFile imageFile) { if (!_isSelectionToggled) { setState(() { if (selectedImages.contains(imageFile)) { selectedImages.remove(imageFile); } else { selectedImages.add(imageFile); } _isSelectionToggled = true; }); } }

caling from build

builder: (context, imageFile) { Future.microtask(() => handleImageSelection(imageFile)); return DefaultDraggableItemWidget( imageFile: imageFile, boxDecoration: BoxDecoration( borderRadius: BorderRadius.circular(20), ), closeButtonAlignment: Alignment.topLeft, fit: BoxFit.cover, closeButtonIcon: const Icon(Icons.delete_rounded, color: Colors.red), closeButtonBoxDecoration: null, showCloseButton: true, closeButtonMargin: const EdgeInsets.all(3), closeButtonPadding: const EdgeInsets.all(3), ); },

sunil-singh-chaudhary avatar Apr 03 '24 08:04 sunil-singh-chaudhary

@sunil-singh-chaudhary Sorry I didn't understand the issue. Can you please explain more?

shubham16g avatar May 22 '24 04:05 shubham16g

@sunil-singh-chaudhary Sorry I didn't understand the issue. Can you please explain more?

shubham16g avatar May 22 '24 04:05 shubham16g