Hence, my solution answers the OP question by answering how to achieve the whole page scrollable. Unfortunately, it is broken for such use cases as the scroll and does not work correctly and the content overflows. I have scratched my head around TabBarView many times with a question 'How to put dynamic-height content inside TabBarView while it is inside a scrollable container?' Sliverfillremaining/slivettoboxadapter for your tabbarview SlivertoboxAdapter(child: // TOP CONTAINER // You can use a customScrollView or a nestedScrollView DefaultTabController( return SIngleChildScrollView(child: DefaultTabController( Essentially, it is the same layout used in the Instragram app (among others) when viewing your personal profile (see: ).įrom the comments you can wrap your page in a singlechildscrollview, disable scroll physics for the listview as the parent is already scrollable. I am very confused as to why it is not working as I feel this is a very simple thing. Getting 'Horizontal viewport was given unbounded height.' with TabBarView in flutter.how to implement a sliverAppBar with a tabBar.How to create a bounded scrollable TabBarView.Flutter scrollable TabBarView in Column without predefined size.Similar Questions that Didnt provide a working solution: I tried using a CustomScrollView but that didnt work.But this results in the following exception when navigating through the tabs: The provided ScrollController is currently attached to more than one ScrollPosition., and produces some dodgy scroll mechanics. I tried using a NestedScrollView with Silvers (from How to create a bounded scrollable TabBarView).Setting the physics property of this ListView to NeverScrollablePhysics() doesnt fix this and results in some weird behaviour. I first tried converting the inner Column into a ListView, which fixed the overflow, but resulted in two separate scrollable areas (the individual tab views and the whole page), which is not what I want - I want a single scrollable area.When the height of the window gets smaller, I get an overflow error at the bottom: Height: MediaQuery.of(context).size.height, Here is a minimum example code (with exact widget definitions removed): return DefaultTabController( And I want the whole page to be scrollable.A TabBarView, where each TabBarView contains a Column. I am having real trouble getting a layout to work within Flutter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |