Selected Item in List-- show position

34 views
Skip to first unread message

Andrew Villegas

unread,
Apr 27, 2021, 12:09:52 PM4/27/21
to Flutter Development (flutter-dev)
Hi Flutter Community,

I posted a question yesterday and just realized I can do a better job at describing my issue, so here is a better description of it!

I have ListView.builder with horizontal scrolling (a custom top navigation bar). As I scroll to the right, the 'selectedIndex' is changing, but the UI inside this widget isn't showing this change in position (please see screenshot attached/ pink container at the top). 

As I swiped right, the 'selected Index' indeed changes, but I'd like to show the position of this change in index as well in my widget. In other words, I'd like the listview to scroll to the right(or left) depending on the selected Index. 
How can I achieve this?

Any guidance would mean a lot.

Thanks,
A.V.
Screen Shot 2021-04-27 at 10.46.39.png
Screen Shot 2021-04-27 at 10.46.39.png

Suzuki Tomohiro

unread,
Apr 28, 2021, 8:54:35 AM4/28/21
to Flutter Development (flutter-dev)
Glad to hear it worked.


To become more experienced with Flutter, learn how to use debugger and release your own app.

On Wed, Apr 28, 2021 at 07:38 Andrew Villegas <villeg...@gmail.com> wrote:
Thanks for this, Suzuki. Got it to work!
Also, totally unrelated question... what would you say is the best way to become more experienced with Flutter? Is it by working on real-life projects/following tutorials/ reading the documentation? A mixture of these? Is any of these not the most ideal approach?

I'm really trying to improve as much as I can :) 

Thanks!

Best,
A.V.

On Tue, Apr 27, 2021 at 11:28 AM Suzuki Tomohiro <suz...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/155f75cd-7e63-400e-9395-ab6419da15d3n%40googlegroups.com.

Andrew Villegas

unread,
Apr 28, 2021, 12:27:51 PM4/28/21
to Suzuki Tomohiro, Flutter Development (flutter-dev)
Thank you. Will definitely work on these two !

--A.V.

You received this message because you are subscribed to a topic in the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flutter-dev/Ts6KAJYIHO8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CAHWORbrfQGOHvvOrRtPOk6Lk0YNFNOhhGatTfwdidU0%3DUYzrJQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages