detail.dart 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. import 'package:dotted_line/dotted_line.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:date_format/date_format.dart';
  4. // import 'package:another_stepper/another_stepper.dart';
  5. var date = formatDate(DateTime.now(), [HH, ':', nn]);
  6. class DetailPage extends StatelessWidget {
  7. final Map<String, dynamic> items;
  8. DetailPage({super.key, required this.items});
  9. @override
  10. Widget build(BuildContext context) {
  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. child: Text(
  110. items['smallText'],
  111. overflow: TextOverflow.clip,
  112. style: TextStyle(
  113. fontWeight: FontWeight.w400,
  114. color: Color(0xff292D32),
  115. fontSize: 14),
  116. ),
  117. ),
  118. DottedLine(
  119. lineLength: 272,
  120. ),
  121. Container(
  122. margin: EdgeInsets.all(5),
  123. width: 272,
  124. child: Text(
  125. items['longText'],
  126. overflow: TextOverflow.clip,
  127. style: TextStyle(
  128. fontWeight: FontWeight.w300,
  129. color: Color(0xff292D32),
  130. fontSize: 13),
  131. ),
  132. )
  133. ],
  134. )
  135. ],
  136. ),
  137. ),
  138. ],
  139. ),
  140. Container(
  141. height: 10,
  142. ),
  143. Container(
  144. padding: EdgeInsets.symmetric(horizontal: 10),
  145. child: Row(
  146. children: [
  147. Text(
  148. 'Ticket Number',
  149. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  150. ),
  151. Spacer(),
  152. Text(
  153. '202209270254',
  154. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  155. )
  156. ],
  157. ),
  158. ),
  159. Container(
  160. height: 10,
  161. ),
  162. Container(
  163. padding: EdgeInsets.symmetric(horizontal: 10),
  164. child: Row(
  165. children: [
  166. Text(
  167. 'Location',
  168. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  169. ),
  170. Spacer(),
  171. Text(
  172. 'Room 331',
  173. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  174. )
  175. ],
  176. ),
  177. ),
  178. Container(
  179. margin: EdgeInsets.all(10),
  180. height: 1,
  181. color: Color(0xff292D32).withOpacity(0.5),
  182. ),
  183. Container(
  184. alignment: Alignment.centerLeft,
  185. padding: EdgeInsets.symmetric(horizontal: 10),
  186. child: Text(
  187. 'Image',
  188. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  189. ),
  190. ),
  191. Container(
  192. height: 5,
  193. ),
  194. Container(
  195. alignment: Alignment.centerLeft,
  196. padding: EdgeInsets.symmetric(horizontal: 10),
  197. child: Text(
  198. 'No image attached.',
  199. style: TextStyle(
  200. fontWeight: FontWeight.w400,
  201. fontSize: 12,
  202. color: Color(0xff292D32).withOpacity(0.85)),
  203. ),
  204. ),
  205. Container(
  206. height: 10,
  207. ),
  208. Container(
  209. alignment: Alignment.centerLeft,
  210. padding: EdgeInsets.symmetric(horizontal: 10),
  211. child: Text(
  212. 'Note',
  213. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  214. ),
  215. ),
  216. Container(
  217. height: 5,
  218. ),
  219. Container(
  220. alignment: Alignment.centerLeft,
  221. padding: EdgeInsets.symmetric(horizontal: 10),
  222. child: Text(
  223. '-',
  224. style: TextStyle(
  225. fontWeight: FontWeight.w400,
  226. fontSize: 12,
  227. color: Color(0xff292D32).withOpacity(0.85)),
  228. ),
  229. ),
  230. Divider(
  231. thickness: 8,
  232. ),
  233. Container(
  234. height: 10,
  235. ),
  236. Container(
  237. alignment: Alignment.centerLeft,
  238. padding: EdgeInsets.symmetric(horizontal: 10),
  239. child: Text(
  240. 'Activity',
  241. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
  242. ),
  243. ),
  244. Container(
  245. height: 10,
  246. ),
  247. Container(
  248. padding: EdgeInsets.symmetric(horizontal: 10),
  249. child: Row(
  250. children: [
  251. Text(
  252. 'Servant',
  253. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  254. ),
  255. Spacer(),
  256. Text(
  257. 'Rendra WS',
  258. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  259. )
  260. ],
  261. ),
  262. ),
  263. Container(
  264. margin: EdgeInsets.all(10),
  265. height: 1,
  266. color: Color(0xff292D32).withOpacity(0.5),
  267. ),
  268. Container(
  269. alignment: Alignment.centerLeft,
  270. padding: EdgeInsets.symmetric(horizontal: 10),
  271. child: Text(
  272. 'Timeline',
  273. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  274. ),
  275. ),
  276. // Padding(
  277. // padding: const EdgeInsets.all(10),
  278. // child: AnotherStepper(
  279. // stepperDirection: Axis.vertical,
  280. // stepperList: [
  281. // StepperData(
  282. // subtitle: StepperText('Requested',
  283. // textStyle: TextStyle(
  284. // color: Color(0xff292D32), fontSize: 14)),
  285. // iconWidget: Container(
  286. // decoration: BoxDecoration(
  287. // color: Color(0xffE8E8E8),
  288. // borderRadius: BorderRadius.circular(30)),
  289. // )),
  290. // StepperData(
  291. // subtitle: StepperText('On Process',
  292. // textStyle: TextStyle(
  293. // color: Color(0xff292D32), fontSize: 14)),
  294. // iconWidget: Container(
  295. // decoration: BoxDecoration(
  296. // color: Color(0xffE8E8E8),
  297. // borderRadius: BorderRadius.circular(30)),
  298. // )),
  299. // StepperData(
  300. // subtitle: StepperText('Finish',
  301. // textStyle: TextStyle(
  302. // color: Color(0xff292D32), fontSize: 14)),
  303. // iconWidget: Container(
  304. // decoration: BoxDecoration(
  305. // color: Color(0xff078C84),
  306. // borderRadius: BorderRadius.circular(30)),
  307. // )),
  308. // ],
  309. // verticalGap: 10,
  310. // ),
  311. // ),
  312. Container(
  313. height: 10,
  314. ),
  315. Container(
  316. padding: EdgeInsets.symmetric(horizontal: 10),
  317. child: Row(
  318. children: [
  319. Icon(
  320. Icons.circle,
  321. color: Color(0xffE8E8E8),
  322. ),
  323. Container(
  324. width: 10,
  325. ),
  326. Text(
  327. 'Requested',
  328. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  329. ),
  330. Spacer(),
  331. Text(
  332. '31 Jan 12:43',
  333. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  334. )
  335. ],
  336. ),
  337. ),
  338. Container(
  339. height: 5,
  340. ),
  341. Container(
  342. padding: EdgeInsets.symmetric(horizontal: 10),
  343. child: Row(
  344. children: [
  345. Icon(
  346. Icons.circle,
  347. color: Color(0xffE8E8E8),
  348. ),
  349. Container(
  350. width: 10,
  351. ),
  352. Text(
  353. 'On Process',
  354. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  355. ),
  356. Spacer(),
  357. Text(
  358. '31 Jan 14:43',
  359. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  360. )
  361. ],
  362. ),
  363. ),
  364. Container(
  365. height: 5,
  366. ),
  367. Container(
  368. padding: EdgeInsets.symmetric(horizontal: 10),
  369. child: Row(
  370. children: [
  371. Icon(
  372. Icons.circle,
  373. color: Color(0xff078C84),
  374. ),
  375. Container(
  376. width: 10,
  377. ),
  378. Text(
  379. 'Finish',
  380. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  381. ),
  382. Spacer(),
  383. Text(
  384. '31 Jan 15:43',
  385. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  386. )
  387. ],
  388. ),
  389. ),
  390. Container(
  391. height: 5,
  392. ),
  393. Container(
  394. alignment: Alignment.centerRight,
  395. padding: EdgeInsets.symmetric(horizontal: 10),
  396. child: Text(
  397. 'tamu minta dibungkus untuk dibawa keluar',
  398. style: TextStyle(
  399. fontWeight: FontWeight.w400,
  400. fontSize: 12,
  401. color: Color(0xff078C84),
  402. ),
  403. ),
  404. ),
  405. Container(
  406. height: 10,
  407. ),
  408. Container(
  409. margin: EdgeInsets.all(10),
  410. height: 1,
  411. color: Color(0xff292D32).withOpacity(0.5),
  412. ),
  413. Container(
  414. height: 10,
  415. ),
  416. Container(
  417. padding: EdgeInsets.symmetric(horizontal: 10),
  418. child: Row(
  419. children: [
  420. Container(
  421. width: 10,
  422. ),
  423. Text(
  424. 'Rate',
  425. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  426. ),
  427. Spacer(),
  428. Text(
  429. 'Really pleased',
  430. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  431. ),
  432. Container(
  433. width: 10,
  434. ),
  435. Icon(Icons.tag_faces)
  436. ],
  437. ),
  438. ),
  439. Divider(
  440. thickness: 8,
  441. ),
  442. ],
  443. ),
  444. ),
  445. );
  446. }
  447. Container gambar(items) {
  448. return Container(
  449. decoration: BoxDecoration(
  450. border: Border.all(color: items['color']),
  451. borderRadius: BorderRadius.all(Radius.circular(20)),
  452. color: items['color'].withOpacity(0.4)),
  453. padding: const EdgeInsets.all(5.0),
  454. child: Image.asset(
  455. items['image'],
  456. fit: BoxFit.cover,
  457. ),
  458. );
  459. }
  460. }