account.dart 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. import 'package:flutter/material.dart';
  2. import 'package:date_format/date_format.dart';
  3. var date = formatDate(DateTime.now(), [HH, ':', nn]);
  4. class AccountPage extends StatefulWidget {
  5. const AccountPage({super.key});
  6. @override
  7. State<AccountPage> createState() => _AccountPageState();
  8. }
  9. class _AccountPageState extends State<AccountPage> {
  10. int _selectedNavbar = 2;
  11. void _changeSelectedNavBar(int index) {
  12. setState(() {
  13. _selectedNavbar = index;
  14. });
  15. }
  16. @override
  17. Widget build(BuildContext context) {
  18. return Scaffold(
  19. appBar: AppBar(
  20. backgroundColor: Colors.white,
  21. automaticallyImplyLeading: false,
  22. elevation: 0,
  23. toolbarHeight: 44,
  24. title: Text(
  25. date,
  26. style: TextStyle(color: Color(0xff303336), fontSize: 15),
  27. ),
  28. actions: [
  29. Icon(
  30. Icons.signal_cellular_alt,
  31. color: Color(0xff303336),
  32. ),
  33. Icon(
  34. Icons.wifi,
  35. color: Color(0xff303336),
  36. ),
  37. RotatedBox(
  38. quarterTurns: -3,
  39. child: Icon(
  40. Icons.battery_std,
  41. color: Color(0xff303336),
  42. ),
  43. )
  44. ],
  45. ),
  46. bottomNavigationBar: BottomNavigationBar(
  47. items: [
  48. BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
  49. BottomNavigationBarItem(icon: Icon(Icons.history), label: 'History'),
  50. BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Account')
  51. ],
  52. currentIndex: _selectedNavbar,
  53. onTap: _changeSelectedNavBar,
  54. ),
  55. body: Column(
  56. children: [
  57. Container(
  58. height: 44,
  59. alignment: Alignment.centerLeft,
  60. padding: EdgeInsets.symmetric(horizontal: 10),
  61. child: Text(
  62. 'Account',
  63. style: TextStyle(fontWeight: FontWeight.bold),
  64. ),
  65. ),
  66. Divider(),
  67. Container(
  68. padding: EdgeInsets.all(10),
  69. child: Row(
  70. children: [
  71. CircleAvatar(
  72. backgroundColor: Color(0xff078C84),
  73. child: Text('J'),
  74. ),
  75. Padding(
  76. padding: const EdgeInsets.symmetric(horizontal: 10),
  77. child: Text(
  78. 'James Triyono',
  79. style: TextStyle(fontWeight: FontWeight.bold),
  80. ),
  81. )
  82. ],
  83. ),
  84. ),
  85. Divider(
  86. thickness: 8,
  87. ),
  88. Container(
  89. alignment: Alignment.centerLeft,
  90. padding: EdgeInsets.all(10),
  91. child: Text(
  92. 'Info',
  93. style: TextStyle(fontWeight: FontWeight.bold),
  94. ),
  95. ),
  96. Container(
  97. height: 5,
  98. ),
  99. Container(
  100. padding: EdgeInsets.symmetric(horizontal: 10),
  101. child: Row(
  102. children: [
  103. Text(
  104. 'User ID',
  105. style: TextStyle(color: Color(0xff292D32).withOpacity(0.75)),
  106. ),
  107. Spacer(),
  108. Text(
  109. 'jamet',
  110. style: TextStyle(color: Color(0xff292D32)),
  111. )
  112. ],
  113. ),
  114. ),
  115. Container(
  116. height: 8,
  117. ),
  118. Container(
  119. padding: EdgeInsets.symmetric(horizontal: 10),
  120. child: Row(
  121. children: [
  122. Text(
  123. 'Location',
  124. style: TextStyle(color: Color(0xff292D32).withOpacity(0.75)),
  125. ),
  126. Spacer(),
  127. Text(
  128. 'Room 331',
  129. style: TextStyle(color: Color(0xff292D32)),
  130. )
  131. ],
  132. ),
  133. ),
  134. Container(
  135. height: 8,
  136. ),
  137. Container(
  138. padding: EdgeInsets.symmetric(horizontal: 10),
  139. child: Row(
  140. children: [
  141. Text(
  142. 'Request Group',
  143. style: TextStyle(color: Color(0xff292D32).withOpacity(0.75)),
  144. ),
  145. Spacer(),
  146. Text(
  147. 'All',
  148. style: TextStyle(color: Color(0xff292D32)),
  149. )
  150. ],
  151. ),
  152. ),
  153. Container(
  154. height: 10,
  155. ),
  156. Divider(
  157. thickness: 8,
  158. ),
  159. Container(
  160. alignment: Alignment.centerLeft,
  161. padding: EdgeInsets.all(10),
  162. child: Text(
  163. 'Setting',
  164. style: TextStyle(fontWeight: FontWeight.bold),
  165. ),
  166. ),
  167. Container(
  168. padding: EdgeInsets.symmetric(horizontal: 10),
  169. child: Row(
  170. children: [
  171. Icon(
  172. Icons.language,
  173. color: Color(0xff292D32).withOpacity(0.75),
  174. ),
  175. Container(
  176. margin: EdgeInsets.symmetric(horizontal: 5),
  177. child: Text('Language')),
  178. Spacer(),
  179. Text('English'),
  180. Icon(Icons.chevron_right)
  181. ],
  182. ),
  183. ),
  184. Container(
  185. margin: EdgeInsets.all(10),
  186. color: Color(0xff514844).withOpacity(0.5),
  187. height: 1,
  188. width: MediaQuery.of(context).size.width * 0.95,
  189. ),
  190. Container(
  191. padding: EdgeInsets.symmetric(horizontal: 10),
  192. child: Row(
  193. children: [
  194. RotationTransition(
  195. turns: AlwaysStoppedAnimation(135 / 360),
  196. child: Icon(
  197. Icons.vpn_key,
  198. color: Color(0xff292D32).withOpacity(0.75),
  199. ),
  200. ),
  201. Container(
  202. margin: EdgeInsets.symmetric(horizontal: 5),
  203. child: Text('Password')),
  204. Spacer(),
  205. Text('Change password'),
  206. Icon(Icons.chevron_right)
  207. ],
  208. ),
  209. ),
  210. Container(
  211. margin: EdgeInsets.all(10),
  212. color: Color(0xff514844).withOpacity(0.5),
  213. height: 1,
  214. width: MediaQuery.of(context).size.width * 0.95,
  215. ),
  216. Container(
  217. padding: EdgeInsets.symmetric(horizontal: 10),
  218. child: Row(
  219. children: [
  220. Icon(
  221. Icons.logout,
  222. color: Color(0xff292D32).withOpacity(0.75),
  223. ),
  224. Container(
  225. margin: EdgeInsets.symmetric(horizontal: 5),
  226. child: Text('Logout')),
  227. Spacer(),
  228. Icon(Icons.chevron_right)
  229. ],
  230. ),
  231. ),
  232. Container(
  233. height: 10,
  234. ),
  235. Divider(
  236. thickness: 8,
  237. ),
  238. ],
  239. ),
  240. );
  241. }
  242. }