my Drawer Header title is not there where I want it. I tried to positionig it further up, but I failed. Here is a picture of the top from the drawer:
The "Menü" is the text I want to positionig further up.
Here is the part of my Code:
Column(children: [
DrawerHeader(
decoration: BoxDecoration(
color: Colors.green,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('Menü',
style: GoogleFonts.oswald(
textStyle: TextStyle(
color: Colors.black,
fontSize: 45,
),
),
),
Solution 1: Ravindra S. Patil
Try below code hope its helpful to you.
Refer Drawer here
Scaffold(
appBar: AppBar(title: Text(title)),
body: const Center(
child: Text('My Page!'),
),
drawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: [
const DrawerHeader(
decoration: BoxDecoration(
color: Colors.blue,
),
child: Text('Drawer Header'),
),
ListTile(
title: const Text('Item 1'),
),
ListTile(
title: const Text('Item 2'),
),
],
),
),
)