detail.dart 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  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. // import 'package:timelines/timelines.dart';
  8. var date = formatDate(DateTime.now(), [HH, ':', nn]);
  9. class DetailPage extends StatelessWidget {
  10. final Map<String, dynamic> items;
  11. DetailPage({super.key, required this.items});
  12. @override
  13. Widget build(BuildContext context) {
  14. return Scaffold(
  15. appBar: AppBar(
  16. backgroundColor: Colors.white,
  17. automaticallyImplyLeading: false,
  18. elevation: 0,
  19. toolbarHeight: 44,
  20. title: Text(
  21. date,
  22. style: TextStyle(color: Color(0xff303336), fontSize: 15),
  23. ),
  24. actions: [
  25. Icon(
  26. Icons.signal_cellular_alt,
  27. color: Color(0xff303336),
  28. ),
  29. Icon(
  30. Icons.wifi,
  31. color: Color(0xff303336),
  32. ),
  33. RotatedBox(
  34. quarterTurns: -3,
  35. child: Icon(
  36. Icons.battery_std,
  37. color: Color(0xff303336),
  38. ),
  39. )
  40. ],
  41. ),
  42. body: SingleChildScrollView(
  43. child: Column(
  44. children: [
  45. Row(
  46. children: [
  47. BackButton(),
  48. Text(
  49. 'Detail',
  50. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
  51. ),
  52. Spacer(),
  53. ElevatedButton(
  54. onPressed: () {},
  55. style: ElevatedButton.styleFrom(
  56. backgroundColor: Color(0xff078C84).withOpacity(0.1),
  57. side: BorderSide(color: Color(0xff078C84)),
  58. shape: RoundedRectangleBorder(
  59. borderRadius: BorderRadius.circular(35))),
  60. child: Row(
  61. children: [
  62. Text(
  63. 'Forum',
  64. style:
  65. TextStyle(color: Color(0xff078C84), fontSize: 15),
  66. ),
  67. SizedBox(
  68. width: 5,
  69. ),
  70. Icon(
  71. Icons.message_outlined,
  72. color: Color(0xff078C84),
  73. )
  74. ],
  75. ),
  76. )
  77. ],
  78. ),
  79. Divider(),
  80. Container(
  81. height: 44,
  82. alignment: Alignment.centerLeft,
  83. padding: EdgeInsets.symmetric(horizontal: 10),
  84. child: Text(
  85. items['type'],
  86. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
  87. ),
  88. ),
  89. Row(
  90. children: [
  91. Container(
  92. width: 400,
  93. margin: EdgeInsets.symmetric(horizontal: 10),
  94. decoration: BoxDecoration(
  95. border: Border.all(color: Colors.black.withOpacity(0.1)),
  96. shape: BoxShape.rectangle,
  97. borderRadius: BorderRadius.circular(12)),
  98. child: Row(
  99. children: [
  100. SizedBox(
  101. width: 100,
  102. height: 79.17,
  103. child: gambar(items),
  104. ),
  105. Container(
  106. width: 5,
  107. ),
  108. Column(
  109. children: [
  110. Container(
  111. margin: EdgeInsets.all(5),
  112. child: Text(
  113. items['smallText'],
  114. overflow: TextOverflow.clip,
  115. style: TextStyle(
  116. fontWeight: FontWeight.w400,
  117. color: Color(0xff292D32),
  118. fontSize: 14),
  119. ),
  120. ),
  121. DottedLine(
  122. lineLength: 272,
  123. ),
  124. Container(
  125. margin: EdgeInsets.all(5),
  126. width: 272,
  127. child: Text(
  128. items['longText'],
  129. overflow: TextOverflow.clip,
  130. style: TextStyle(
  131. fontWeight: FontWeight.w300,
  132. color: Color(0xff292D32),
  133. fontSize: 13),
  134. ),
  135. )
  136. ],
  137. )
  138. ],
  139. ),
  140. ),
  141. ],
  142. ),
  143. Container(
  144. height: 10,
  145. ),
  146. Container(
  147. padding: EdgeInsets.symmetric(horizontal: 10),
  148. child: Row(
  149. children: [
  150. Text(
  151. 'Ticket Number',
  152. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  153. ),
  154. Spacer(),
  155. Text(
  156. '202209270254',
  157. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  158. )
  159. ],
  160. ),
  161. ),
  162. Container(
  163. height: 10,
  164. ),
  165. Container(
  166. padding: EdgeInsets.symmetric(horizontal: 10),
  167. child: Row(
  168. children: [
  169. Text(
  170. 'Location',
  171. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  172. ),
  173. Spacer(),
  174. Text(
  175. 'Room 331',
  176. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  177. )
  178. ],
  179. ),
  180. ),
  181. Container(
  182. margin: EdgeInsets.all(10),
  183. height: 1,
  184. color: Color(0xff292D32).withOpacity(0.5),
  185. ),
  186. Container(
  187. alignment: Alignment.centerLeft,
  188. padding: EdgeInsets.symmetric(horizontal: 10),
  189. child: Text(
  190. 'Image',
  191. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  192. ),
  193. ),
  194. Container(
  195. height: 5,
  196. ),
  197. Container(
  198. alignment: Alignment.centerLeft,
  199. padding: EdgeInsets.symmetric(horizontal: 10),
  200. child: Text(
  201. 'No image attached.',
  202. style: TextStyle(
  203. fontWeight: FontWeight.w400,
  204. fontSize: 12,
  205. color: Color(0xff292D32).withOpacity(0.85)),
  206. ),
  207. ),
  208. Container(
  209. height: 10,
  210. ),
  211. Container(
  212. alignment: Alignment.centerLeft,
  213. padding: EdgeInsets.symmetric(horizontal: 10),
  214. child: Text(
  215. 'Note',
  216. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  217. ),
  218. ),
  219. Container(
  220. height: 5,
  221. ),
  222. Container(
  223. alignment: Alignment.centerLeft,
  224. padding: EdgeInsets.symmetric(horizontal: 10),
  225. child: Text(
  226. '-',
  227. style: TextStyle(
  228. fontWeight: FontWeight.w400,
  229. fontSize: 12,
  230. color: Color(0xff292D32).withOpacity(0.85)),
  231. ),
  232. ),
  233. Divider(
  234. thickness: 8,
  235. ),
  236. Container(
  237. height: 10,
  238. ),
  239. Container(
  240. alignment: Alignment.centerLeft,
  241. padding: EdgeInsets.symmetric(horizontal: 10),
  242. child: Text(
  243. 'Activity',
  244. style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
  245. ),
  246. ),
  247. Container(
  248. height: 10,
  249. ),
  250. Container(
  251. padding: EdgeInsets.symmetric(horizontal: 10),
  252. child: Row(
  253. children: [
  254. Text(
  255. 'Servant',
  256. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  257. ),
  258. Spacer(),
  259. Text(
  260. 'Rendra WS',
  261. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  262. )
  263. ],
  264. ),
  265. ),
  266. Container(
  267. margin: EdgeInsets.all(10),
  268. height: 1,
  269. color: Color(0xff292D32).withOpacity(0.5),
  270. ),
  271. Container(
  272. alignment: Alignment.centerLeft,
  273. padding: EdgeInsets.symmetric(horizontal: 10),
  274. child: Text(
  275. 'Timeline',
  276. style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
  277. ),
  278. ),
  279. //=======timelines tile=======
  280. Container(
  281. margin: EdgeInsets.all(10),
  282. child: Column(
  283. children: [
  284. SizedBox(
  285. child: TimelineTile(
  286. isFirst: true,
  287. endChild: Container(
  288. margin:
  289. EdgeInsets.only(bottom: 10, top: 10, left: 10),
  290. child: Row(
  291. children: [
  292. Text('Requested'),
  293. Spacer(),
  294. Text('31 Jan 12:43')
  295. ],
  296. ),
  297. ))),
  298. SizedBox(
  299. child: TimelineTile(
  300. endChild: Container(
  301. margin: EdgeInsets.only(bottom: 10, top: 10, left: 10),
  302. child: Row(
  303. children: [
  304. Text('On Process'),
  305. Spacer(),
  306. Text('31 Jan 14:43')
  307. ],
  308. ),
  309. ))),
  310. SizedBox(
  311. child: TimelineTile(
  312. indicatorStyle:
  313. IndicatorStyle(color: Color(0xff078C84), width: 25),
  314. isLast: true,
  315. endChild: Container(
  316. margin: EdgeInsets.only(bottom: 10, top: 10, left: 10),
  317. child: Row(
  318. children: [
  319. Text('Finish'),
  320. Spacer(),
  321. Text('31 Jan 15:43')
  322. ],
  323. ),
  324. ),
  325. )),
  326. ],
  327. ),
  328. ),
  329. //=======timelines tile=======
  330. //=======easy stepper=======
  331. // EasyStepper(
  332. // activeStep: 1,
  333. // direction: Axis.vertical,
  334. // alignment: Alignment.centerLeft,
  335. // steps: [
  336. // EasyStep(icon: Icon(Icons.abc), lineText: 'def'),
  337. // EasyStep(icon: Icon(Icons.ac_unit)),
  338. // EasyStep(icon: Icon(Icons.access_alarm)),
  339. // ],
  340. // ),
  341. //=======easy stepper=======
  342. //=======another stepper======
  343. // Padding(
  344. // padding: const EdgeInsets.all(10),
  345. // child: AnotherStepper(
  346. // stepperDirection: Axis.vertical,
  347. // verticalGap: 10,
  348. // stepperList: [
  349. // StepperData(
  350. // subtitle: StepperText('Requested',
  351. // textStyle: TextStyle(
  352. // color: Color(0xff292D32), fontSize: 14)),
  353. // iconWidget: Container(
  354. // decoration: BoxDecoration(
  355. // color: Color(0xffE8E8E8),
  356. // borderRadius: BorderRadius.circular(30)),
  357. // )),
  358. // StepperData(
  359. // subtitle: StepperText('On Process',
  360. // textStyle: TextStyle(
  361. // color: Color(0xff292D32), fontSize: 14)),
  362. // iconWidget: Container(
  363. // decoration: BoxDecoration(
  364. // color: Color(0xffE8E8E8),
  365. // borderRadius: BorderRadius.circular(30)),
  366. // )),
  367. // StepperData(
  368. // subtitle: StepperText('Finish',
  369. // textStyle: TextStyle(
  370. // color: Color(0xff292D32), fontSize: 14)),
  371. // iconWidget: Container(
  372. // decoration: BoxDecoration(
  373. // color: Color(0xff078C84),
  374. // borderRadius: BorderRadius.circular(30)),
  375. // )),
  376. // ],
  377. // ),
  378. // ),
  379. //=======another stepper======
  380. //=======stepper=======
  381. // Stepper(
  382. // controlsBuilder: (context, details) {
  383. // return Container();
  384. // },
  385. // steps: [
  386. // Step(
  387. // content: Container(),
  388. // title: Row(
  389. // children: [
  390. // Text('Requested'),
  391. // Spacer(),
  392. // Text('31 Jan 12:43')
  393. // ],
  394. // )),
  395. // Step(
  396. // content: Container(),
  397. // title: Row(
  398. // children: [
  399. // Text('On Process'),
  400. // Spacer(),
  401. // Text('31 Jan 14:43')
  402. // ],
  403. // )),
  404. // Step(
  405. // content: Container(),
  406. // title: Row(
  407. // children: [
  408. // Text('Finish'),
  409. // Spacer(),
  410. // Text('31 Jan 15:43')
  411. // ],
  412. // )),
  413. // ]),
  414. //=======stepper=======
  415. //=======manual========
  416. // Container(
  417. // height: 10,
  418. // ),
  419. // Container(
  420. // padding: EdgeInsets.symmetric(horizontal: 10),
  421. // child: Row(
  422. // children: [
  423. // Icon(
  424. // Icons.circle,
  425. // color: Color(0xffE8E8E8),
  426. // ),
  427. // Container(
  428. // width: 10,
  429. // ),
  430. // Text(
  431. // 'Requested',
  432. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  433. // ),
  434. // Spacer(),
  435. // Text(
  436. // '31 Jan 12:43',
  437. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  438. // )
  439. // ],
  440. // ),
  441. // ),
  442. // Container(
  443. // height: 5,
  444. // ),
  445. // Container(
  446. // padding: EdgeInsets.symmetric(horizontal: 10),
  447. // child: Row(
  448. // children: [
  449. // Icon(
  450. // Icons.circle,
  451. // color: Color(0xffE8E8E8),
  452. // ),
  453. // Container(
  454. // width: 10,
  455. // ),
  456. // Text(
  457. // 'On Process',
  458. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  459. // ),
  460. // Spacer(),
  461. // Text(
  462. // '31 Jan 14:43',
  463. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  464. // )
  465. // ],
  466. // ),
  467. // ),
  468. // Container(
  469. // height: 5,
  470. // ),
  471. // Container(
  472. // padding: EdgeInsets.symmetric(horizontal: 10),
  473. // child: Row(
  474. // children: [
  475. // Icon(
  476. // Icons.circle,
  477. // color: Color(0xff078C84),
  478. // ),
  479. // Container(
  480. // width: 10,
  481. // ),
  482. // Text(
  483. // 'Finish',
  484. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  485. // ),
  486. // Spacer(),
  487. // Text(
  488. // '31 Jan 15:43',
  489. // style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  490. // )
  491. // ],
  492. // ),
  493. // ),
  494. // Container(
  495. // height: 5,
  496. // ),
  497. //=======manual========
  498. Container(
  499. alignment: Alignment.centerRight,
  500. padding: EdgeInsets.symmetric(horizontal: 10),
  501. child: Text(
  502. 'tamu minta dibungkus untuk dibawa keluar',
  503. style: TextStyle(
  504. fontWeight: FontWeight.w400,
  505. fontSize: 12,
  506. color: Color(0xff078C84),
  507. ),
  508. ),
  509. ),
  510. Container(
  511. height: 10,
  512. ),
  513. Container(
  514. margin: EdgeInsets.all(10),
  515. height: 1,
  516. color: Color(0xff292D32).withOpacity(0.5),
  517. ),
  518. Container(
  519. height: 10,
  520. ),
  521. Container(
  522. padding: EdgeInsets.symmetric(horizontal: 10),
  523. child: Row(
  524. children: [
  525. Container(
  526. width: 10,
  527. ),
  528. Text(
  529. 'Rate',
  530. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  531. ),
  532. Spacer(),
  533. Text(
  534. 'Really pleased',
  535. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  536. ),
  537. Container(
  538. width: 10,
  539. ),
  540. Icon(Icons.tag_faces)
  541. ],
  542. ),
  543. ),
  544. Divider(
  545. thickness: 8,
  546. ),
  547. ],
  548. ),
  549. ),
  550. );
  551. }
  552. Container gambar(items) {
  553. return Container(
  554. decoration: BoxDecoration(
  555. border: Border.all(color: items['color']),
  556. borderRadius: BorderRadius.all(Radius.circular(20)),
  557. color: items['color'].withOpacity(0.4)),
  558. padding: const EdgeInsets.all(5.0),
  559. child: Image.asset(
  560. items['image'],
  561. fit: BoxFit.cover,
  562. ),
  563. );
  564. }
  565. }