detail.dart 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  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. // import 'package:easy_stepper/easy_stepper.dart';
  6. import 'package:timeline_tile/timeline_tile.dart';
  7. var date = formatDate(DateTime.now(), [HH, ':', nn]);
  8. class DetailPage extends StatelessWidget {
  9. final Map<String, dynamic> items;
  10. DetailPage({super.key, required this.items});
  11. @override
  12. Widget build(BuildContext context) {
  13. return Scaffold(
  14. appBar: AppBar(
  15. backgroundColor: Colors.white,
  16. automaticallyImplyLeading: false,
  17. elevation: 0,
  18. toolbarHeight: 44,
  19. title: Text(
  20. date,
  21. style: TextStyle(color: Color(0xff303336), fontSize: 15),
  22. ),
  23. actions: [
  24. Icon(
  25. Icons.signal_cellular_alt,
  26. color: Color(0xff303336),
  27. ),
  28. Icon(
  29. Icons.wifi,
  30. color: Color(0xff303336),
  31. ),
  32. RotatedBox(
  33. quarterTurns: -3,
  34. child: Icon(
  35. Icons.battery_std,
  36. color: Color(0xff303336),
  37. ),
  38. )
  39. ],
  40. ),
  41. body: SingleChildScrollView(
  42. child: Column(
  43. children: [
  44. Row(
  45. children: [
  46. BackButton(),
  47. Text(
  48. 'Detail',
  49. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
  50. ),
  51. Spacer(),
  52. ElevatedButton(
  53. onPressed: () {},
  54. style: ElevatedButton.styleFrom(
  55. backgroundColor: Color(0xff078C84).withOpacity(0.1),
  56. side: BorderSide(color: Color(0xff078C84)),
  57. shape: RoundedRectangleBorder(
  58. borderRadius: BorderRadius.circular(35))),
  59. child: Row(
  60. children: [
  61. Text(
  62. 'Forum',
  63. style:
  64. TextStyle(color: Color(0xff078C84), fontSize: 15),
  65. ),
  66. SizedBox(
  67. width: 5,
  68. ),
  69. Icon(
  70. Icons.message_outlined,
  71. color: Color(0xff078C84),
  72. )
  73. ],
  74. ),
  75. )
  76. ],
  77. ),
  78. Divider(),
  79. Container(
  80. height: 44,
  81. alignment: Alignment.centerLeft,
  82. padding: EdgeInsets.symmetric(horizontal: 10),
  83. child: Text(
  84. items['type'],
  85. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
  86. ),
  87. ),
  88. Row(
  89. children: [
  90. Container(
  91. width: 400,
  92. margin: EdgeInsets.symmetric(horizontal: 10),
  93. decoration: BoxDecoration(
  94. border: Border.all(color: Colors.black.withOpacity(0.1)),
  95. shape: BoxShape.rectangle,
  96. borderRadius: BorderRadius.circular(12)),
  97. child: Row(
  98. children: [
  99. SizedBox(
  100. width: 100,
  101. height: 79.17,
  102. child: gambar(items),
  103. ),
  104. Container(
  105. width: 5,
  106. ),
  107. Column(
  108. children: [
  109. Container(
  110. margin: EdgeInsets.all(5),
  111. child: Text(
  112. items['smallText'],
  113. overflow: TextOverflow.clip,
  114. style: TextStyle(
  115. fontWeight: FontWeight.w400,
  116. color: Color(0xff292D32),
  117. fontSize: 14),
  118. ),
  119. ),
  120. DottedLine(
  121. lineLength: 272,
  122. ),
  123. Container(
  124. margin: EdgeInsets.all(5),
  125. width: 272,
  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. //=======timelines=======
  279. TimelineTile(
  280. indicatorStyle: IndicatorStyle(
  281. width: 20,
  282. height: 5,
  283. indicatorXY: 0,
  284. ),
  285. endChild: Container(
  286. padding: EdgeInsets.symmetric(horizontal: 10),
  287. child: Row(
  288. children: [
  289. Text('Requested'),
  290. Spacer(),
  291. Text('31 Jan 12:43'),
  292. ],
  293. ),
  294. ),
  295. ),
  296. //=======timelines=======
  297. //=======easy stepper=======
  298. // EasyStepper(
  299. // activeStep: 1,
  300. // direction: Axis.vertical,
  301. // alignment: Alignment.centerLeft,
  302. // steps: [
  303. // EasyStep(icon: Icon(Icons.abc), lineText: 'def'),
  304. // EasyStep(icon: Icon(Icons.ac_unit)),
  305. // EasyStep(icon: Icon(Icons.access_alarm)),
  306. // ],
  307. // ),
  308. //=======easy stepper=======
  309. //=======another stepper======
  310. // Padding(
  311. // padding: const EdgeInsets.all(10),
  312. // child: AnotherStepper(
  313. // stepperDirection: Axis.vertical,
  314. // verticalGap: 10,
  315. // stepperList: [
  316. // StepperData(
  317. // subtitle: StepperText('Requested',
  318. // textStyle: TextStyle(
  319. // color: Color(0xff292D32), fontSize: 14)),
  320. // iconWidget: Container(
  321. // decoration: BoxDecoration(
  322. // color: Color(0xffE8E8E8),
  323. // borderRadius: BorderRadius.circular(30)),
  324. // )),
  325. // StepperData(
  326. // subtitle: StepperText('On Process',
  327. // textStyle: TextStyle(
  328. // color: Color(0xff292D32), fontSize: 14)),
  329. // iconWidget: Container(
  330. // decoration: BoxDecoration(
  331. // color: Color(0xffE8E8E8),
  332. // borderRadius: BorderRadius.circular(30)),
  333. // )),
  334. // StepperData(
  335. // subtitle: StepperText('Finish',
  336. // textStyle: TextStyle(
  337. // color: Color(0xff292D32), fontSize: 14)),
  338. // iconWidget: Container(
  339. // decoration: BoxDecoration(
  340. // color: Color(0xff078C84),
  341. // borderRadius: BorderRadius.circular(30)),
  342. // )),
  343. // ],
  344. // ),
  345. // ),
  346. //=======another stepper======
  347. //=======stepper=======
  348. // Stepper(
  349. // controlsBuilder: (context, details) {
  350. // return Container(height: 1,);
  351. // },
  352. // steps: [
  353. // Step(
  354. // content: Container(height: null,),
  355. // title: Row(
  356. // children: [
  357. // Text('Requested'),
  358. // Spacer(),
  359. // Text('31 Jan 12:43')
  360. // ],
  361. // )),
  362. // Step(content: Container(), title: Text('On Process')),
  363. // Step(content: Container(), title: Text('Finish')),
  364. // ]),
  365. //=======stepper=======
  366. //=======manual========
  367. // Container(
  368. // height: 10,
  369. // ),
  370. // Container(
  371. // padding: EdgeInsets.symmetric(horizontal: 10),
  372. // child: Row(
  373. // children: [
  374. // Icon(
  375. // Icons.circle,
  376. // color: Color(0xffE8E8E8),
  377. // ),
  378. // Container(
  379. // width: 10,
  380. // ),
  381. // Text(
  382. // 'Requested',
  383. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  384. // ),
  385. // Spacer(),
  386. // Text(
  387. // '31 Jan 12:43',
  388. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  389. // )
  390. // ],
  391. // ),
  392. // ),
  393. // Container(
  394. // height: 5,
  395. // ),
  396. // Container(
  397. // padding: EdgeInsets.symmetric(horizontal: 10),
  398. // child: Row(
  399. // children: [
  400. // Icon(
  401. // Icons.circle,
  402. // color: Color(0xffE8E8E8),
  403. // ),
  404. // Container(
  405. // width: 10,
  406. // ),
  407. // Text(
  408. // 'On Process',
  409. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  410. // ),
  411. // Spacer(),
  412. // Text(
  413. // '31 Jan 14:43',
  414. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  415. // )
  416. // ],
  417. // ),
  418. // ),
  419. // Container(
  420. // height: 5,
  421. // ),
  422. // Container(
  423. // padding: EdgeInsets.symmetric(horizontal: 10),
  424. // child: Row(
  425. // children: [
  426. // Icon(
  427. // Icons.circle,
  428. // color: Color(0xff078C84),
  429. // ),
  430. // Container(
  431. // width: 10,
  432. // ),
  433. // Text(
  434. // 'Finish',
  435. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  436. // ),
  437. // Spacer(),
  438. // Text(
  439. // '31 Jan 15:43',
  440. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  441. // )
  442. // ],
  443. // ),
  444. // ),
  445. // Container(
  446. // height: 5,
  447. // ),
  448. //=======manual========
  449. Container(
  450. alignment: Alignment.centerRight,
  451. padding: EdgeInsets.symmetric(horizontal: 10),
  452. child: Text(
  453. 'tamu minta dibungkus untuk dibawa keluar',
  454. style: TextStyle(
  455. fontWeight: FontWeight.w400,
  456. fontSize: 12,
  457. color: Color(0xff078C84),
  458. ),
  459. ),
  460. ),
  461. Container(
  462. height: 10,
  463. ),
  464. Container(
  465. margin: EdgeInsets.all(10),
  466. height: 1,
  467. color: Color(0xff292D32).withOpacity(0.5),
  468. ),
  469. Container(
  470. height: 10,
  471. ),
  472. Container(
  473. padding: EdgeInsets.symmetric(horizontal: 10),
  474. child: Row(
  475. children: [
  476. Container(
  477. width: 10,
  478. ),
  479. Text(
  480. 'Rate',
  481. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  482. ),
  483. Spacer(),
  484. Text(
  485. 'Really pleased',
  486. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  487. ),
  488. Container(
  489. width: 10,
  490. ),
  491. Icon(Icons.tag_faces)
  492. ],
  493. ),
  494. ),
  495. Divider(
  496. thickness: 8,
  497. ),
  498. ],
  499. ),
  500. ),
  501. );
  502. }
  503. Container gambar(items) {
  504. return Container(
  505. decoration: BoxDecoration(
  506. border: Border.all(color: items['color']),
  507. borderRadius: BorderRadius.all(Radius.circular(20)),
  508. color: items['color'].withOpacity(0.4)),
  509. padding: const EdgeInsets.all(5.0),
  510. child: Image.asset(
  511. items['image'],
  512. fit: BoxFit.cover,
  513. ),
  514. );
  515. }
  516. }