search.dart 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. import 'package:flutter/material.dart';
  2. import 'package:date_format/date_format.dart';
  3. import 'package:dotted_line/dotted_line.dart';
  4. var date = formatDate(DateTime.now(), [HH, ':', nn]);
  5. class SearchPage extends StatelessWidget {
  6. final Map<String, dynamic> items;
  7. SearchPage({super.key, required this.items});
  8. @override
  9. Widget build(BuildContext context) {
  10. return Scaffold(
  11. appBar: AppBar(
  12. backgroundColor: Colors.white,
  13. automaticallyImplyLeading: false,
  14. elevation: 0,
  15. toolbarHeight: 44,
  16. title: Text(
  17. date,
  18. style: TextStyle(color: Color(0xff303336), fontSize: 15),
  19. ),
  20. actions: [
  21. Icon(
  22. Icons.signal_cellular_alt,
  23. color: Color(0xff303336),
  24. ),
  25. Icon(
  26. Icons.wifi,
  27. color: Color(0xff303336),
  28. ),
  29. RotatedBox(
  30. quarterTurns: -3,
  31. child: Icon(
  32. Icons.battery_std,
  33. color: Color(0xff303336),
  34. ),
  35. )
  36. ],
  37. ),
  38. body: SingleChildScrollView(
  39. child: Column(
  40. crossAxisAlignment: CrossAxisAlignment.start,
  41. children: [
  42. Row(
  43. children: [
  44. BackButton(),
  45. Container(
  46. height: 44,
  47. alignment: Alignment.centerLeft,
  48. padding: EdgeInsets.symmetric(horizontal: 10),
  49. child: Text(
  50. items['type'],
  51. style: TextStyle(fontWeight: FontWeight.w500, fontSize: 17),
  52. ),
  53. ),
  54. ],
  55. ),
  56. Padding(
  57. padding: const EdgeInsets.symmetric(horizontal: 10),
  58. child: SizedBox(
  59. width: 396,
  60. height: 267.72,
  61. child: gambar(items),
  62. ),
  63. ),
  64. Container(
  65. width: 396,
  66. margin: EdgeInsets.all(5),
  67. decoration: BoxDecoration(
  68. border: Border.all(color: Colors.black.withOpacity(0.1)),
  69. shape: BoxShape.rectangle,
  70. borderRadius: BorderRadius.circular(12)),
  71. child: Column(
  72. crossAxisAlignment: CrossAxisAlignment.start,
  73. children: [
  74. Container(
  75. margin: EdgeInsets.all(5),
  76. child: Text(
  77. items['type'],
  78. overflow: TextOverflow.clip,
  79. style: TextStyle(
  80. fontWeight: FontWeight.w400,
  81. color: Color(0xff292D32),
  82. fontSize: 14),
  83. ),
  84. ),
  85. Padding(
  86. padding: const EdgeInsets.symmetric(horizontal: 5),
  87. child: DottedLine(),
  88. ),
  89. Container(
  90. margin: EdgeInsets.all(5),
  91. child: Text(
  92. items['longText'],
  93. overflow: TextOverflow.clip,
  94. style: TextStyle(
  95. fontWeight: FontWeight.w300,
  96. color: Color(0xff292D32),
  97. fontSize: 13),
  98. ),
  99. ),
  100. ],
  101. ),
  102. ),
  103. Container(
  104. margin: EdgeInsets.all(10),
  105. child: Text(
  106. 'Your Location',
  107. style: TextStyle(fontWeight: FontWeight.w500, fontSize: 14),
  108. ),
  109. ),
  110. Container(
  111. width: 396,
  112. margin: EdgeInsets.symmetric(horizontal: 10),
  113. decoration: BoxDecoration(
  114. color: Color(0xff078C84).withOpacity(0.85),
  115. border: Border.all(color: Color(0xff078C84)),
  116. shape: BoxShape.rectangle,
  117. borderRadius: BorderRadius.only(
  118. topLeft: Radius.circular(12),
  119. topRight: Radius.circular(12))),
  120. child: Padding(
  121. padding: const EdgeInsets.all(5),
  122. child: Column(
  123. crossAxisAlignment: CrossAxisAlignment.start,
  124. children: [
  125. Row(
  126. children: [
  127. Icon(Icons.remove),
  128. Column(
  129. crossAxisAlignment: CrossAxisAlignment.start,
  130. children: [
  131. Text('Default Location'),
  132. Container(
  133. height: 5,
  134. ),
  135. Text('Room 331')
  136. ],
  137. )
  138. ],
  139. ),
  140. ]))),
  141. Container(
  142. width: 396,
  143. margin: EdgeInsets.symmetric(
  144. horizontal: 10,
  145. ),
  146. decoration: BoxDecoration(
  147. border: Border.all(color: Colors.black.withOpacity(0.1)),
  148. shape: BoxShape.rectangle,
  149. borderRadius: BorderRadius.only(
  150. bottomLeft: Radius.circular(12),
  151. bottomRight: Radius.circular(12))),
  152. child: Padding(
  153. padding: const EdgeInsets.all(5),
  154. child: Column(
  155. crossAxisAlignment: CrossAxisAlignment.start,
  156. children: [
  157. Row(
  158. children: [
  159. Icon(Icons.add),
  160. Column(
  161. crossAxisAlignment: CrossAxisAlignment.start,
  162. children: [
  163. Text('I moved to other location'),
  164. Container(
  165. width: 350,
  166. margin: EdgeInsets.symmetric(vertical: 5),
  167. decoration: BoxDecoration(
  168. border: Border.all(
  169. color: Colors.black.withOpacity(0.1)),
  170. shape: BoxShape.rectangle,
  171. borderRadius: BorderRadius.circular(12)),
  172. child: Row(
  173. children: [
  174. Padding(
  175. padding: const EdgeInsets.symmetric(
  176. horizontal: 5),
  177. child: Icon(
  178. Icons.location_on_outlined,
  179. color: Color(0xffD91B1B),
  180. ),
  181. ),
  182. Text(
  183. 'Where are you?',
  184. style: TextStyle(
  185. fontWeight: FontWeight.w300,
  186. fontSize: 13,
  187. color: Color(0xff292D32)
  188. .withOpacity(0.5)),
  189. )
  190. ],
  191. ),
  192. )
  193. ],
  194. )
  195. ],
  196. ),
  197. ],
  198. ))),
  199. Container(
  200. margin: EdgeInsets.all(10),
  201. child: Text(
  202. 'Add Image',
  203. style: TextStyle(fontWeight: FontWeight.w500, fontSize: 14),
  204. ),
  205. ),
  206. Container(
  207. margin: EdgeInsets.symmetric(horizontal: 10),
  208. child: Row(
  209. children: [
  210. Text(
  211. 'You can send us a picture as a clue or something..',
  212. style: TextStyle(
  213. fontWeight: FontWeight.w300,
  214. fontSize: 12,
  215. color: Color(0xff292D32).withOpacity(0.85)),
  216. ),
  217. Spacer(),
  218. Icon(
  219. Icons.photo_camera,
  220. color: Color(0xff078C84),
  221. )
  222. ],
  223. ),
  224. ),
  225. Divider(),
  226. Container(
  227. width: 394,
  228. margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
  229. decoration: BoxDecoration(
  230. border: Border.all(color: Colors.black.withOpacity(0.1)),
  231. shape: BoxShape.rectangle,
  232. borderRadius: BorderRadius.circular(12)),
  233. child: Padding(
  234. padding: const EdgeInsets.all(5),
  235. child: Row(
  236. children: [
  237. Icon(Icons.edit),
  238. Container(
  239. width: 5,
  240. ),
  241. Text('Add note..',
  242. style: TextStyle(
  243. fontWeight: FontWeight.w300,
  244. fontSize: 13,
  245. color: Color(0xff292D32).withOpacity(0.5))),
  246. ],
  247. ),
  248. ),
  249. ),
  250. Container(
  251. margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
  252. width: 396,
  253. height: 51,
  254. child: ElevatedButton(
  255. style: ElevatedButton.styleFrom(
  256. backgroundColor: Color(0xff078C84),
  257. ),
  258. onPressed: () {},
  259. child: Text(
  260. 'Send Request',
  261. style: TextStyle(
  262. fontWeight: FontWeight.w600,
  263. fontSize: 16,
  264. color: Colors.white),
  265. )),
  266. )
  267. ],
  268. ),
  269. ),
  270. );
  271. }
  272. Container gambar(items) {
  273. return Container(
  274. decoration: BoxDecoration(
  275. border: Border.all(color: items['color']),
  276. borderRadius: BorderRadius.all(Radius.circular(20)),
  277. color: items['color'].withOpacity(0.4)),
  278. padding: const EdgeInsets.all(5.0),
  279. child: Image.asset(
  280. items['image'],
  281. fit: BoxFit.cover,
  282. ),
  283. );
  284. }
  285. }