drawer with navigation in fluter code example

Example 1: flutter drawer

Scaffold(
   drawer: Drawer(
      child: ListView(
        padding: EdgeInsets.zero,
        children: [
              DrawerHeader(
                   child: Text("Header")),
              ListTile(
                  title: Text("Home"))
        ]),
  ), 
);

Example 2: app drawer in flutter

Widget createDrawerBodyItem(
   {IconData icon, String text, GestureTapCallback onTap}) {
 return ListTile(
   title: Row(
     children: <Widget>[
       Icon(icon),
       Padding(
         padding: EdgeInsets.only(left: 8.0),
         child: Text(text),
       )
     ],
   ),
   onTap: onTap,
 );
}

Example 3: flutter navigation drawer

Widget _createDrawerItem(    {IconData icon, String text, GestureTapCallback onTap}) {  return ListTile(    title: Row(      children: <Widget>[        Icon(icon),        Padding(          padding: EdgeInsets.only(left: 8.0),          child: Text(text),        )      ],    ),    onTap: onTap,  );}