In Flutter, I have a TabBarView
within a NestedScrollView
with two children. The two children are scrollable, and are built with FutureBuilder
, when there're data they return a ListView
.
When there's no data, it'll fetch them from server, and return a Text
with a notice "Nothing to show yet." before the data are loaded. However in this case, you can still scroll the blank part with only a Text
even make it disappear into the top out of screen.
How to disable the scrolling when it's not necessary? Is it possible to make the NestedScrollView
smart to decide weather to enable scroll itself, for example by comparing the children's Height and the Height of screen? Thanks!
FutureBuilder
are very complex. I think it is kind of irrelevant to this issue. You can think of it as aText
within aContainer
when there's no local data. @KedarKarki – Soteriology