detail.dart 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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:timeline_tile/timeline_tile.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. Container(
  277. margin: EdgeInsets.all(10),
  278. child: Column(
  279. children: [
  280. SizedBox(
  281. child: TimelineTile(
  282. isFirst: true,
  283. endChild: Container(
  284. margin:
  285. EdgeInsets.only(bottom: 10, top: 10, left: 10),
  286. child: Row(
  287. children: [
  288. Text('Requested'),
  289. Spacer(),
  290. Text('31 Jan 12:43')
  291. ],
  292. ),
  293. ))),
  294. SizedBox(
  295. child: TimelineTile(
  296. endChild: Container(
  297. margin: EdgeInsets.only(bottom: 10, top: 10, left: 10),
  298. child: Row(
  299. children: [
  300. Text('On Process'),
  301. Spacer(),
  302. Text('31 Jan 14:43')
  303. ],
  304. ),
  305. ))),
  306. SizedBox(
  307. child: TimelineTile(
  308. indicatorStyle:
  309. IndicatorStyle(color: Color(0xff078C84), width: 25),
  310. isLast: true,
  311. endChild: Container(
  312. margin: EdgeInsets.only(bottom: 10, top: 10, left: 10),
  313. child: Row(
  314. children: [
  315. Text('Finish'),
  316. Spacer(),
  317. Text('31 Jan 15:43')
  318. ],
  319. ),
  320. ),
  321. )),
  322. ],
  323. ),
  324. ),
  325. Container(
  326. alignment: Alignment.centerRight,
  327. padding: EdgeInsets.symmetric(horizontal: 10),
  328. child: Text(
  329. 'tamu minta dibungkus untuk dibawa keluar',
  330. style: TextStyle(
  331. fontWeight: FontWeight.w400,
  332. fontSize: 12,
  333. color: Color(0xff078C84),
  334. ),
  335. ),
  336. ),
  337. Container(
  338. height: 10,
  339. ),
  340. Container(
  341. margin: EdgeInsets.all(10),
  342. height: 1,
  343. color: Color(0xff292D32).withOpacity(0.5),
  344. ),
  345. Container(
  346. height: 10,
  347. ),
  348. Container(
  349. padding: EdgeInsets.symmetric(horizontal: 10),
  350. child: Row(
  351. children: [
  352. Container(
  353. width: 10,
  354. ),
  355. Text(
  356. 'Rate',
  357. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  358. ),
  359. Spacer(),
  360. Text(
  361. 'Really pleased',
  362. style: TextStyle(color: Color(0xff292D32), fontSize: 14),
  363. ),
  364. Container(
  365. width: 10,
  366. ),
  367. Icon(Icons.tag_faces)
  368. ],
  369. ),
  370. ),
  371. Divider(
  372. thickness: 8,
  373. ),
  374. ],
  375. ),
  376. ),
  377. );
  378. }
  379. Container gambar(items) {
  380. return Container(
  381. decoration: BoxDecoration(
  382. border: Border.all(color: items['color']),
  383. borderRadius: BorderRadius.all(Radius.circular(20)),
  384. color: items['color'].withOpacity(0.4)),
  385. padding: const EdgeInsets.all(5.0),
  386. child: Image.asset(
  387. items['image'],
  388. fit: BoxFit.cover,
  389. ),
  390. );
  391. }
  392. }