detail.dart 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. import 'package:dotted_line/dotted_line.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:date_format/date_format.dart';
  4. var date = formatDate(DateTime.now(), [HH, ':', nn]);
  5. class DetailPage extends StatelessWidget {
  6. final Map<String, dynamic> items;
  7. DetailPage({super.key, required this.items});
  8. @override
  9. Widget build(BuildContext context) {
  10. // print(items);
  11. return Scaffold(
  12. appBar: AppBar(
  13. backgroundColor: Colors.white,
  14. automaticallyImplyLeading: false,
  15. elevation: 0,
  16. toolbarHeight: 44,
  17. title: Text(
  18. date,
  19. style: TextStyle(color: Color(0xff303336), fontSize: 15),
  20. ),
  21. actions: [
  22. Icon(
  23. Icons.signal_cellular_alt,
  24. color: Color(0xff303336),
  25. ),
  26. Icon(
  27. Icons.wifi,
  28. color: Color(0xff303336),
  29. ),
  30. RotatedBox(
  31. quarterTurns: -3,
  32. child: Icon(
  33. Icons.battery_std,
  34. color: Color(0xff303336),
  35. ),
  36. )
  37. ],
  38. ),
  39. body: SingleChildScrollView(
  40. child: Column(
  41. children: [
  42. Row(
  43. children: [
  44. BackButton(),
  45. Text(
  46. 'Detail',
  47. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
  48. ),
  49. Spacer(),
  50. ElevatedButton(
  51. onPressed: () {},
  52. style: ElevatedButton.styleFrom(
  53. backgroundColor: Color(0xff078C84).withOpacity(0.1),
  54. side: BorderSide(color: Color(0xff078C84)),
  55. shape: RoundedRectangleBorder(
  56. borderRadius: BorderRadius.circular(35))),
  57. child: Row(
  58. children: [
  59. Text(
  60. 'Forum',
  61. style:
  62. TextStyle(color: Color(0xff078C84), fontSize: 15),
  63. ),
  64. SizedBox(
  65. width: 5,
  66. ),
  67. Icon(
  68. Icons.message_outlined,
  69. color: Color(0xff078C84),
  70. )
  71. ],
  72. ),
  73. )
  74. ],
  75. ),
  76. Divider(),
  77. Container(
  78. height: 44,
  79. alignment: Alignment.centerLeft,
  80. padding: EdgeInsets.symmetric(horizontal: 10),
  81. child: Text(
  82. items['type'],
  83. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
  84. ),
  85. ),
  86. Row(
  87. children: [
  88. Container(
  89. width: 400,
  90. margin: EdgeInsets.symmetric(horizontal: 10),
  91. decoration: BoxDecoration(
  92. border: Border.all(color: Colors.black.withOpacity(0.1)),
  93. shape: BoxShape.rectangle,
  94. borderRadius: BorderRadius.circular(12)),
  95. child: Row(
  96. children: [
  97. SizedBox(
  98. width: 100,
  99. height: 79.17,
  100. child: gambar(items),
  101. ),
  102. Container(
  103. width: 5,
  104. ),
  105. Column(
  106. children: [
  107. Container(
  108. margin: EdgeInsets.all(5),
  109. decoration: BoxDecoration(),
  110. child: Text(
  111. items['smallText'],
  112. overflow: TextOverflow.clip,
  113. style: TextStyle(
  114. fontWeight: FontWeight.w400,
  115. color: Color(0xff292D32),
  116. fontSize: 14),
  117. ),
  118. ),
  119. DottedLine(
  120. lineLength: 272,
  121. ),
  122. Container(
  123. margin: EdgeInsets.all(5),
  124. width: 272,
  125. decoration: BoxDecoration(),
  126. child: Text(
  127. items['longText'],
  128. overflow: TextOverflow.clip,
  129. style: TextStyle(
  130. fontWeight: FontWeight.w300,
  131. color: Color(0xff292D32),
  132. fontSize: 13),
  133. ),
  134. )
  135. ],
  136. )
  137. ],
  138. ),
  139. ),
  140. ],
  141. ),
  142. Container(
  143. height: 10,
  144. ),
  145. Container(
  146. padding: EdgeInsets.symmetric(horizontal: 10),
  147. child: Row(
  148. children: [
  149. Text(
  150. 'Ticket Number',
  151. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  152. ),
  153. Spacer(),
  154. Text(
  155. '202209270254',
  156. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  157. )
  158. ],
  159. ),
  160. ),
  161. Container(
  162. height: 10,
  163. ),
  164. Container(
  165. padding: EdgeInsets.symmetric(horizontal: 10),
  166. child: Row(
  167. children: [
  168. Text(
  169. 'Location',
  170. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  171. ),
  172. Spacer(),
  173. Text(
  174. 'Room 331',
  175. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  176. )
  177. ],
  178. ),
  179. ),
  180. Container(
  181. margin: EdgeInsets.all(10),
  182. height: 1,
  183. color: Color(0xff292D32).withOpacity(0.5),
  184. ),
  185. Container(
  186. alignment: Alignment.centerLeft,
  187. padding: EdgeInsets.symmetric(horizontal: 10),
  188. child: Text(
  189. 'Image',
  190. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  191. ),
  192. ),
  193. Container(
  194. height: 5,
  195. ),
  196. Container(
  197. alignment: Alignment.centerLeft,
  198. padding: EdgeInsets.symmetric(horizontal: 10),
  199. child: Text(
  200. 'No image attached.',
  201. style: TextStyle(
  202. fontWeight: FontWeight.w400,
  203. fontSize: 12,
  204. color: Color(0xff292D32).withOpacity(0.85)),
  205. ),
  206. ),
  207. Container(
  208. height: 10,
  209. ),
  210. Container(
  211. alignment: Alignment.centerLeft,
  212. padding: EdgeInsets.symmetric(horizontal: 10),
  213. child: Text(
  214. 'Note',
  215. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  216. ),
  217. ),
  218. Container(
  219. height: 5,
  220. ),
  221. Container(
  222. alignment: Alignment.centerLeft,
  223. padding: EdgeInsets.symmetric(horizontal: 10),
  224. child: Text(
  225. '-',
  226. style: TextStyle(
  227. fontWeight: FontWeight.w400,
  228. fontSize: 12,
  229. color: Color(0xff292D32).withOpacity(0.85)),
  230. ),
  231. ),
  232. Divider(
  233. thickness: 8,
  234. ),
  235. Container(
  236. height: 10,
  237. ),
  238. Container(
  239. alignment: Alignment.centerLeft,
  240. padding: EdgeInsets.symmetric(horizontal: 10),
  241. child: Text(
  242. 'Activity',
  243. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
  244. ),
  245. ),
  246. Container(
  247. height: 10,
  248. ),
  249. Container(
  250. padding: EdgeInsets.symmetric(horizontal: 10),
  251. child: Row(
  252. children: [
  253. Text(
  254. 'Servant',
  255. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  256. ),
  257. Spacer(),
  258. Text(
  259. 'Rendra WS',
  260. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  261. )
  262. ],
  263. ),
  264. ),
  265. Container(
  266. margin: EdgeInsets.all(10),
  267. height: 1,
  268. color: Color(0xff292D32).withOpacity(0.5),
  269. ),
  270. Container(
  271. alignment: Alignment.centerLeft,
  272. padding: EdgeInsets.symmetric(horizontal: 10),
  273. child: Text(
  274. 'Timeline',
  275. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  276. ),
  277. ),
  278. Container(
  279. height: 10,
  280. ),
  281. Container(
  282. padding: EdgeInsets.symmetric(horizontal: 10),
  283. child: Row(
  284. children: [
  285. Icon(
  286. Icons.circle,
  287. color: Color(0xffE8E8E8),
  288. ),
  289. Container(
  290. width: 10,
  291. ),
  292. Text(
  293. 'Requested',
  294. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  295. ),
  296. Spacer(),
  297. Text(
  298. '31 Jan 12:43',
  299. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  300. )
  301. ],
  302. ),
  303. ),
  304. Container(
  305. height: 5,
  306. ),
  307. Container(
  308. padding: EdgeInsets.symmetric(horizontal: 10),
  309. child: Row(
  310. children: [
  311. Icon(
  312. Icons.circle,
  313. color: Color(0xffE8E8E8),
  314. ),
  315. Container(
  316. width: 10,
  317. ),
  318. Text(
  319. 'On Process',
  320. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  321. ),
  322. Spacer(),
  323. Text(
  324. '31 Jan 14:43',
  325. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  326. )
  327. ],
  328. ),
  329. ),
  330. Container(
  331. height: 5,
  332. ),
  333. Container(
  334. padding: EdgeInsets.symmetric(horizontal: 10),
  335. child: Row(
  336. children: [
  337. Icon(
  338. Icons.circle,
  339. color: Color(0xff078C84),
  340. ),
  341. Container(
  342. width: 10,
  343. ),
  344. Text(
  345. 'Finish',
  346. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  347. ),
  348. Spacer(),
  349. Text(
  350. '31 Jan 15:43',
  351. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  352. )
  353. ],
  354. ),
  355. ),
  356. Container(
  357. height: 5,
  358. ),
  359. Container(
  360. alignment: Alignment.centerRight,
  361. padding: EdgeInsets.symmetric(horizontal: 10),
  362. child: Text(
  363. 'tamu minta dibungkus untuk dibawa keluar',
  364. style: TextStyle(
  365. fontWeight: FontWeight.w400,
  366. fontSize: 12,
  367. color: Color(0xff078C84),
  368. ),
  369. ),
  370. ),
  371. Container(
  372. height: 10,
  373. ),
  374. Container(
  375. margin: EdgeInsets.all(10),
  376. height: 1,
  377. color: Color(0xff292D32).withOpacity(0.5),
  378. ),
  379. Container(
  380. height: 10,
  381. ),
  382. Container(
  383. padding: EdgeInsets.symmetric(horizontal: 10),
  384. child: Row(
  385. children: [
  386. Container(
  387. width: 10,
  388. ),
  389. Text(
  390. 'Rate',
  391. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  392. ),
  393. Spacer(),
  394. Text(
  395. 'Really pleased',
  396. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  397. ),
  398. Container(
  399. width: 10,
  400. ),
  401. Icon(Icons.tag_faces)
  402. ],
  403. ),
  404. ),
  405. Divider(
  406. thickness: 8,
  407. ),
  408. ],
  409. ),
  410. ),
  411. );
  412. }
  413. Container gambar(items) {
  414. return Container(
  415. decoration: BoxDecoration(
  416. border: Border.all(color: items['color']),
  417. borderRadius: BorderRadius.all(Radius.circular(20)),
  418. color: items['color'].withOpacity(0.4)),
  419. padding: const EdgeInsets.all(5.0),
  420. child: Image.asset(
  421. items['image'],
  422. fit: BoxFit.cover,
  423. ),
  424. );
  425. }
  426. }