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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With