Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. Widget defaultDrawer(BuildContext context) {
  2. return Drawer(
  3. child: ListView(
  4. padding: EdgeInsets.zero,
  5. children: <Widget>[
  6. new DrawerHeader(
  7. child: Center(
  8. child: new Image.asset(
  9. "assets/logos/logo-color.png",
  10. ),
  11. ),
  12. ),
  13. ListTile(
  14. key: new Key("Home"),
  15. title: Row(
  16. mainAxisAlignment: MainAxisAlignment.start,
  17. crossAxisAlignment: CrossAxisAlignment.start,
  18. children: <Widget>[
  19. new Icon(
  20. Icons.home,
  21. color: hexToColor("#979797"),
  22. ),
  23. new Padding(
  24. padding: EdgeInsets.all(10.0),
  25. ),
  26. new Text(
  27. "Home",
  28. style: TextStyle(
  29. color: hexToColor("#979797"),
  30. fontWeight: FontWeight.bold,
  31. fontSize: 20.0,
  32. ),
  33. ),
  34. ],
  35. ),
  36. onTap: () {
  37. Navigator.push(
  38. context,
  39. MaterialPageRoute(
  40. builder: (context) => HomePage()
  41. ),
  42. );
  43. },
  44. ),
  45. ListTile(
  46. key: new Key("Ceremonies"),
  47. title: Row(
  48. mainAxisAlignment: MainAxisAlignment.start,
  49. crossAxisAlignment: CrossAxisAlignment.start,
  50. children: <Widget>[
  51. new Icon(
  52. Icons.graphic_eq,
  53. color: hexToColor("#979797"),
  54. ),
  55. new Padding(
  56. padding: EdgeInsets.all(10.0),
  57. ),
  58. new Text(
  59. "Ceremonies",
  60. style: TextStyle(
  61. color: hexToColor("#979797"),
  62. fontWeight: FontWeight.bold,
  63. fontSize: 20.0,
  64. ),
  65. ),
  66. ],
  67. ),
  68. onTap: () {
  69. Navigator.push(
  70. context,
  71. MaterialPageRoute(
  72. builder: (context) => ListCeremonies()
  73. ),
  74. );
  75. }, //TODO: Implement fungsi buat callback kalo mencet Ceremonies di drawer
  76. ),
  77. ListTile(
  78. key: new Key("Problems"),
  79. title: Row(
  80. mainAxisAlignment: MainAxisAlignment.start,
  81. crossAxisAlignment: CrossAxisAlignment.start,
  82. children: <Widget>[
  83. new Icon(
  84. Icons.warning,
  85. color: hexToColor("#979797"),
  86. ),
  87. new Padding(
  88. padding: EdgeInsets.all(10.0),
  89. ),
  90. new Text(
  91. "Problems",
  92. style: TextStyle(
  93. color: hexToColor("#979797"),
  94. fontWeight: FontWeight.bold,
  95. fontSize: 20.0,
  96. ),
  97. ),
  98. ],
  99. ),
  100. onTap: () {
  101. Navigator.push(
  102. context,
  103. MaterialPageRoute(
  104. builder: (context) => ListProblems()
  105. ),
  106. );
  107. },
  108. ),
  109. ListTile(
  110. key: new Key("Glossary"),
  111. title: Row(
  112. mainAxisAlignment: MainAxisAlignment.start,
  113. crossAxisAlignment: CrossAxisAlignment.start,
  114. children: <Widget>[
  115. new Icon(
  116. Icons.book,
  117. color: hexToColor("#979797"),
  118. ),
  119. new Padding(
  120. padding: EdgeInsets.all(10.0),
  121. ),
  122. new Text(
  123. "Glossary",
  124. style: TextStyle(
  125. color: hexToColor("#979797"),
  126. fontWeight: FontWeight.bold,
  127. fontSize: 20.0,
  128. ),
  129. ),
  130. ],
  131. ),
  132. onTap: () {
  133. Navigator.push(
  134. context,
  135. MaterialPageRoute(
  136. builder: (context) => GlossaryPage()
  137. ),
  138. );
  139. }, //TODO: Implement fungsi buat callback kalo mencet Glossary di drawer
  140. ),
  141. ListTile(
  142. key: new Key("Pop Quiz!"),
  143. title: Row(
  144. mainAxisAlignment: MainAxisAlignment.start,
  145. crossAxisAlignment: CrossAxisAlignment.start,
  146. children: <Widget>[
  147. new Icon(
  148. Icons.question_answer,
  149. color: hexToColor("#979797"),
  150. ),
  151. new Padding(
  152. padding: EdgeInsets.all(10.0),
  153. ),
  154. new Text(
  155. "Pop Quiz!",
  156. style: TextStyle(
  157. color: hexToColor("#979797"),
  158. fontWeight: FontWeight.bold,
  159. fontSize: 20.0,
  160. ),
  161. ),
  162. ],
  163. ),
  164. onTap: () {}, //TODO: Implement fungsi buat callback kalo mencet Pop Quiz di drawer
  165. ),
  166. ListTile(
  167. key: new Key("About"),
  168. title: Row(
  169. mainAxisAlignment: MainAxisAlignment.start,
  170. crossAxisAlignment: CrossAxisAlignment.start,
  171. children: <Widget>[
  172. new Icon(
  173. Icons.info,
  174. color: hexToColor("#979797"),
  175. ),
  176. new Padding(
  177. padding: EdgeInsets.all(10.0),
  178. ),
  179. new Text(
  180. "About",
  181. style: TextStyle(
  182. color: hexToColor("#979797"),
  183. fontWeight: FontWeight.bold,
  184. fontSize: 20.0,
  185. ),
  186. ),
  187. ],
  188. ),
  189. onTap: () {
  190. Navigator.push(
  191. context,
  192. MaterialPageRoute(
  193. builder: (context) => AboutPage()
  194. ),
  195. );
  196. }, //TODO: Implement fungsi buat callback kalo mencet About di drawer
  197. ),
  198. ],
  199. ),
  200. );
  201. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement