Solution 1 :
You can just wrap your Text widget in a container that aligns it.
To change the size of the header just add another container around the Header that sets the height.
new Drawer(
child: ListView(
children: <Widget>[
Container(
child: new DrawerHeader(
child: Container(
child: Text("Drawer Header"),
alignment: Alignment.bottomLeft, // <-- ALIGNMENT
height: 10,
),
decoration: BoxDecoration(color: Colors.blueGrey),
),
height: 50, // <-- HEIGHT
)
],
),
),
Solution 2 :
just wrap your DrawerHeader
with a SizedBox
and wrap your Text
with a Align
widget
drawer: Drawer
(
child: ListView
(
children: <Widget>
[
SizedBox(
height: 150,
child: DrawerHeader
(
child: Align(
alignment: Alignment.bottomLeft,
child: Text("Drawer Header")
),
decoration: BoxDecoration
(
color: Colors.blueGrey
),
)
)
],
),
),
Problem :
So i just want to postion the text in the bottom left of the drawer header and also reduce the height of the drawer header
drawer: new Drawer
(
child: ListView
(
children: <Widget>
[
new DrawerHeader
(
child: Text("Drawer Header"),
decoration: BoxDecoration
(
color: Colors.blueGrey
),
)
],
),
),