I'm trying to add a tab group in the middle of my screen, but I'm getting the Overflowed error.
This what I have
Expanded(
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.vertical(
top: Radius.circular(30),
bottom: Radius.circular(0),
),
color: Colors.blueGrey,
),
child: ConstrainedBox(
constraints: BoxConstraints(),
child: DefaultTabController(
length: 3,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
child: TabBar(tabs: [
Tab(text: "Home"),
Tab(text: "Articles"),
Tab(text: "User"),
]),
),
ConstrainedBox(
constraints: BoxConstraints(),
child: Container(
height: MediaQuery.of(context).size.height,
child: TabBarView(children: [
Container(
child: Column(
children: [
Text("Home Body"),
Text("Home Body"),
Text("Home Body"),
Text("Home Body"),
],
),
),
Container(
child: Text("Articles Body"),
),
Container(
child: Text("User Body"),
),
]),
),
),
],
),
),
),
),
),
If I got it right, the error is coming from this line
height: MediaQuery.of(context).size.height,
but how can I sort it without adding a fixed value? (I assume giving a fixed value depending on the screen size I would have the same error right?)
----------------------------- Update:

