What widget to create this? What the keyword for this style?
Carousel menu.
What widget to create this?
Scroll box. Or List View if you have 1000s of items.
Ok thanks, I manage to make it by using ScrollWidgetIntoView. But how can I select my button after its on the center by scrolling it.
- the arrows shift the index
- the scroll box scrolls to the item at index
- get the scrollbox’s child at index
If you’re scrolling onto a widget directly, then you already have it…
I want select my buttons by scrolling it. But is there any way to implement this with ScrollBox?
Yes, as explained above. You literally have your answer in front of you.
- if you’re using indexes, get child at index
- if you’re scrolling to a widget, then you already have the selected widget…
What you linked is a List View, not a Scroll Box.
You can’t use a loop like this, not for this. Override scroll wheel in the widget and use indexes.
Your original image shows buttons:
That’s what was assumed you wanted to do. If you need something more specific, please clarify.
I want select the next/previous items just by scrolling/ by dragging from click cursor, scroll up select next item, scroll down select previous item.
Again, as above. Override mouse wheel, count indexes, scroll into view using the widget you fetch from the scroll box using the index.
Ok thanks, mouse wheel works fine.
But how to implement this with touch input only by swiping/dragging/sliding the button from the scrollbox.
Carousel Animation In figma | Smart drag animation #shorts #figma