Guest User

Untitled

a guest
Dec 15th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1. class _Main extends State<Main> {
  2.  
  3.  
  4. @override
  5.  
  6.  
  7.  
  8. Widget build(BuildContext context) {
  9. Size screenSize = MediaQuery.of(context).size;
  10. return Scaffold(
  11. appBar: AppBar(
  12. title: Image.asset('images/gurita.png'),
  13. backgroundColor: Colors.black,
  14. centerTitle: true,
  15. actions: <Widget>[
  16. new Stack(
  17. children: <Widget>[
  18. IconButton(
  19. icon: Icon(Icons.shopping_cart),
  20. color: Colors.blue,
  21. onPressed: () {
  22. Navigator.push(
  23. context,
  24. CupertinoPageRoute(builder: (context) => Checkout()),
  25. );
  26. },
  27. ),
  28. new CircleAvatar(
  29. radius: 10.0,
  30. backgroundColor: Colors.red,
  31. child: Text(
  32. "0",
  33. style: TextStyle(color: Colors.white),
  34. ),
  35. ),
  36. ],
  37. ),
  38. IconButton(
  39. icon: Icon(Icons.more_vert),
  40. onPressed: () {
  41. Navigator.push(
  42. context,
  43. MaterialPageRoute(
  44. builder: (context) =>
  45. Help(), //Pindah halaman ke help, herp oh herp :v
  46. ),
  47. );
  48. },
  49. ),
  50. ],
  51. ),
  52. drawer: Drawer(
  53. child: Container(
  54. margin: EdgeInsets.only(right: 0),
  55. child: Column(
  56. children: <Widget>[
  57. UserAccountsDrawerHeader(
  58. decoration: BoxDecoration(
  59. image: DecorationImage(
  60. image: AssetImage('images/background.png'),
  61. ),
  62. ),
  63. accountName: new Text("Alam Jaya"),
  64. accountEmail: new Text("tengusky1@gmail.com"),
  65. currentAccountPicture: new CircleAvatar(
  66. backgroundColor: Colors.white,
  67. child: Icon(Icons.person),
  68. ),
  69. ),
  70. Expanded(
  71. child: Center(
  72. child: InkWell(
  73. onTap: () {
  74. Navigator.push(context,
  75. CupertinoPageRoute(builder: (context) => Profile()));
  76. },
  77. child: ListTile(
  78. leading: IconButton(
  79. icon: Icon(Icons.person),
  80. onPressed: () {},
  81. ),
  82. title: Text("Profile",
  83. style: TextStyle(fontWeight: FontWeight.bold)),
  84. ),
  85. ),
  86. ),
  87. ),
  88. new Divider(color: Colors.black26),
  89. Expanded(
  90. child: InkWell(
  91. child: ListTile(
  92. title: Text("Voucher / Point",
  93. style: TextStyle(fontWeight: FontWeight.bold)),
  94. leading: IconButton(
  95. icon: Icon(Icons.person),
  96. onPressed: () {},
  97. ),
  98. ),
  99. ),
  100. ),
  101. new Divider(color: Colors.black26),
  102. InkWell(
  103. child: ListTile(
  104. title: Text("My Flash Deal",
  105. style: TextStyle(fontWeight: FontWeight.bold)),
  106. leading: IconButton(
  107. icon: Icon(Icons.person),
  108. onPressed: () {},
  109. ),
  110. ),
  111. ),
  112. new Divider(color: Colors.black26),
  113. Expanded(
  114. child: InkWell(
  115. child: ListTile(
  116. title: Text("Kategori",
  117. style: TextStyle(fontWeight: FontWeight.bold)),
  118. leading: IconButton(
  119. icon: Icon(Icons.person),
  120. onPressed: () {},
  121. ),
  122. ),
  123. ),
  124. ),
  125. new Divider(color: Colors.black26),
  126. Expanded(
  127. child: InkWell(
  128. child: ListTile(
  129. title: Text("Reservasi",
  130. style: TextStyle(fontWeight: FontWeight.bold)),
  131. leading: IconButton(
  132. icon: Icon(Icons.person),
  133. onPressed: () {},
  134. ),
  135. ),
  136. ),
  137. ),
  138. new Divider(color: Colors.black26),
  139. Expanded(
  140. child: InkWell(
  141. child: ListTile(
  142. title: Text("History",
  143. style: TextStyle(fontWeight: FontWeight.bold)),
  144. leading: IconButton(
  145. icon: Icon(Icons.person),
  146. onPressed: () {},
  147. ),
  148. ),
  149. ),
  150. ),
  151. new Divider(color: Colors.black26),
  152. Expanded(
  153. child: InkWell(
  154. child: ListTile(
  155. title: Text("About",
  156. style: TextStyle(fontWeight: FontWeight.bold)),
  157. leading: IconButton(
  158. icon: Icon(Icons.person),
  159. onPressed: () {},
  160. ),
  161. ),
  162. ),
  163. ),
  164. new Divider(color: Colors.black26),
  165. Expanded(
  166. child: InkWell(
  167. child: ListTile(
  168. title: Text("Login",
  169. style: TextStyle(fontWeight: FontWeight.bold)),
  170. leading: IconButton(
  171. icon: Icon(Icons.person),
  172. onPressed: () {},
  173. ),
  174. ),
  175. ),
  176. ),
  177. new Divider(color: Colors.black26),
  178. Expanded(
  179. child: InkWell(
  180. child: ListTile(
  181. title: Text("Daftar",
  182. style: TextStyle(fontWeight: FontWeight.bold)),
  183. leading: IconButton(
  184. icon: Icon(Icons.person),
  185. onPressed: () {},
  186. ),
  187. ),
  188. ),
  189. ),
  190. ],
  191. ),
  192. ),
  193. ),
  194. body: ListView(
  195. children: <Widget>[
  196. new Column(
  197. children: <Widget>[],
  198. ),
  199. ],
  200. ),
  201. );
  202. }
  203. }
Add Comment
Please, Sign In to add comment