How to add drawer at top left corner without appbar, when i tried using positioned widget and Iconbutton and use Drawer as widget function, but it not working. Is there any other method??
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
Widget drawer() {
return Drawer();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.lightBlue,
body: SafeArea(
child: Positioned(
top: 2,
left: 2,
child: IconButton(
icon: Icon(
Icons.menu,
),
onPressed: () {
drawer();
},
),
),
),
);
}
}