Created
March 19, 2019 04:56
-
-
Save izznfkhrlislm/65c96f07e1724803683cb24a39599c0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget defaultDrawer(BuildContext context) { | |
return Drawer( | |
child: ListView( | |
padding: EdgeInsets.zero, | |
children: <Widget>[ | |
new DrawerHeader( | |
child: Center( | |
child: new Image.asset( | |
"assets/logos/logo-color.png", | |
), | |
), | |
), | |
ListTile( | |
key: new Key("Home"), | |
title: Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
new Icon( | |
Icons.home, | |
color: hexToColor("#979797"), | |
), | |
new Padding( | |
padding: EdgeInsets.all(10.0), | |
), | |
new Text( | |
"Home", | |
style: TextStyle( | |
color: hexToColor("#979797"), | |
fontWeight: FontWeight.bold, | |
fontSize: 20.0, | |
), | |
), | |
], | |
), | |
onTap: () { | |
Navigator.push( | |
context, | |
MaterialPageRoute( | |
builder: (context) => HomePage() | |
), | |
); | |
}, | |
), | |
ListTile( | |
key: new Key("Ceremonies"), | |
title: Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
new Icon( | |
Icons.graphic_eq, | |
color: hexToColor("#979797"), | |
), | |
new Padding( | |
padding: EdgeInsets.all(10.0), | |
), | |
new Text( | |
"Ceremonies", | |
style: TextStyle( | |
color: hexToColor("#979797"), | |
fontWeight: FontWeight.bold, | |
fontSize: 20.0, | |
), | |
), | |
], | |
), | |
onTap: () { | |
Navigator.push( | |
context, | |
MaterialPageRoute( | |
builder: (context) => ListCeremonies() | |
), | |
); | |
}, //TODO: Implement fungsi buat callback kalo mencet Ceremonies di drawer | |
), | |
ListTile( | |
key: new Key("Problems"), | |
title: Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
new Icon( | |
Icons.warning, | |
color: hexToColor("#979797"), | |
), | |
new Padding( | |
padding: EdgeInsets.all(10.0), | |
), | |
new Text( | |
"Problems", | |
style: TextStyle( | |
color: hexToColor("#979797"), | |
fontWeight: FontWeight.bold, | |
fontSize: 20.0, | |
), | |
), | |
], | |
), | |
onTap: () { | |
Navigator.push( | |
context, | |
MaterialPageRoute( | |
builder: (context) => ListProblems() | |
), | |
); | |
}, | |
), | |
ListTile( | |
key: new Key("Glossary"), | |
title: Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
new Icon( | |
Icons.book, | |
color: hexToColor("#979797"), | |
), | |
new Padding( | |
padding: EdgeInsets.all(10.0), | |
), | |
new Text( | |
"Glossary", | |
style: TextStyle( | |
color: hexToColor("#979797"), | |
fontWeight: FontWeight.bold, | |
fontSize: 20.0, | |
), | |
), | |
], | |
), | |
onTap: () { | |
Navigator.push( | |
context, | |
MaterialPageRoute( | |
builder: (context) => GlossaryPage() | |
), | |
); | |
}, //TODO: Implement fungsi buat callback kalo mencet Glossary di drawer | |
), | |
ListTile( | |
key: new Key("Pop Quiz!"), | |
title: Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
new Icon( | |
Icons.question_answer, | |
color: hexToColor("#979797"), | |
), | |
new Padding( | |
padding: EdgeInsets.all(10.0), | |
), | |
new Text( | |
"Pop Quiz!", | |
style: TextStyle( | |
color: hexToColor("#979797"), | |
fontWeight: FontWeight.bold, | |
fontSize: 20.0, | |
), | |
), | |
], | |
), | |
onTap: () {}, //TODO: Implement fungsi buat callback kalo mencet Pop Quiz di drawer | |
), | |
ListTile( | |
key: new Key("About"), | |
title: Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
new Icon( | |
Icons.info, | |
color: hexToColor("#979797"), | |
), | |
new Padding( | |
padding: EdgeInsets.all(10.0), | |
), | |
new Text( | |
"About", | |
style: TextStyle( | |
color: hexToColor("#979797"), | |
fontWeight: FontWeight.bold, | |
fontSize: 20.0, | |
), | |
), | |
], | |
), | |
onTap: () { | |
Navigator.push( | |
context, | |
MaterialPageRoute( | |
builder: (context) => AboutPage() | |
), | |
); | |
}, //TODO: Implement fungsi buat callback kalo mencet About di drawer | |
), | |
], | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment