Flutter ListView with nested TabBarView

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Flutter ListView with nested TabBarView



I'm trying to layout my flutter application so that it looks like:


-ListView
-WidgetA
-DefaultTabBarController
-Column
-TabBar
-Expanded
-TabBarView
-WidgetB
-WidgetC



So that the whole screen is scollable and that the contents of Widgets A, B, and C can change and the height of the screen is not fixed.



The only way I have been able to get this to work is by doing something like:


-ListView
-WidgetA
-Container (with fixed height)
-Column
-Expanded
-DefaultTabBarController
-Column
-TabBar
-Expanded
-TabBarView
-WidgetB
-WidgetC



But I don't want to have a hardcoded height. Does anyone know how I can achieve this?




1 Answer
1



I've run into the same problem, I think I'm on the right track using Flexible class instead of Column. https://docs.flutter.io/flutter/widgets/Flexible-class.html I'm also using Slivers https://docs.flutter.io/flutter/widgets/SliverList-class.html with CustomScrollView instead of ListView https://docs.flutter.io/flutter/widgets/CustomScrollView-class.html






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard