flutterdartlayoutheightdrawer

Create this layout in Flutter


layout

I am trying to get this layout. The orange and red are fixed areas. White can be or a listview or a SingleChildScrollView.

This is the Drawer...

So the height of white region is flexible. Orange and red need to be fixed.

I tryed to use Column with mainAxisAlignment.spaceEvenly but not worked.

Thank you!


Solution

  • Column(
          children: [
            Container(color: Colors.orange, height: orangeHeight),
            Expanded(
              child: Container(
                color: Colors.white,
                child: ListView(),
              ),
            ),
            Container(color: Colors.red, height: redHeight),
          ],
        )