quire-io / scroll-to-index

scroll to index with fixed/variable row height inside Flutter scrollable widget
MIT License
518 stars 105 forks source link

Highlight but not scrolling #23

Closed rahuldange09 closed 4 years ago

rahuldange09 commented 4 years ago

Highlight but not scrolling to bottom items which are not visible. I have

SingleChildScollView(
    child:  ListView.generate( // works with this 
         child : ListView.generate( /// but not this
          )
     )
) 

PS : I have added scrollcontroller to singlechildscrollview I read other issues but its not solving my problem

Even if I go to that bottom item and try it scrolls back to top area where it becomes invisible

rahuldange09 commented 4 years ago

Well I fixed it by using Column instead of ListView

SingleChildScollView(
    child:  ListView.generate( // works with this 
         child : Column( /// but not this
          )
     )
) 

But any workaround to use it with ListView?

jerrywell commented 4 years ago

you can just use ListView instead of singleChildScrollView + column. it's because the column view is not a on demand widget which means the performance is not good. using list view will let you easily separate different row for lazy init when enter viewport.

rahuldange09 commented 4 years ago

you can just use ListView instead of singleChildScrollView + column. it's because the column view is not a on demand widget which means the performance is not good. using list view will let you easily separate different row for lazy init when enter viewport.

Yes I really want to use listview only that why I'm asking solution for https://github.com/quire-io/scroll-to-index/issues/23#issue-564797710 this problem. Please help.

jerrywell commented 4 years ago

Hi, i mean, why you don't use

ListView(
    children: ...
)

instead of the whole code block as following:

SingleChildScollView(
    child: ListView(
        children: ...
    )
) 
rahuldange09 commented 4 years ago

Hi, Still thats not solving my problem. Problem occurs when I place listview inside listview. but if i put column inside listview then it works.

Do I need any changes in listview to make it work. Because it works if I place column inside listview but not listview inside listview

jerrywell commented 4 years ago

Got you point. so this is a nested CustomScrollView issue. merged to #22.