Added new parameter disabledChildrenInteraction
on CarouselView
to allow developer to control which part is clickable
#155214
+140
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
disabledChildrenInteraction
parameter toCarouselView
widgetThis PR addresses issues #155199 and #154701 by adding a new parameter to the CarouselView widget that allows developers to control which parts of the carousel are clickable. Currently, an InkWell covers the entire carousel, preventing child widgets from being clickable even when children widget have their clickable widgets.
The new
disabledChildrenInteraction
parameter allows developers to disable this default behavior ofInkWell
without breaking any existing code. IfdisabledChildrenInteraction
isfalse
, theonTap
of theCarouselView
will be disabled. And developer can define their own click behavior likes animation ,the clickable widget and so on.I have added some new test cases and passed all of them
///
).If you need help, consider asking for advice on the #hackers-new channel on [Discord].