Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reimburse_screen.dart 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:google_fonts/google_fonts.dart';
  4. import '../SlipGaji/background.dart';
  5. class ReimburseScreen extends StatefulWidget {
  6. const ReimburseScreen({Key? key}) : super(key: key);
  7. @override
  8. State<ReimburseScreen> createState() => _ReimburseScreen_State();
  9. }
  10. class _ReimburseScreen_State extends State<ReimburseScreen> {
  11. var selectedCategory;
  12. var selectedDate;
  13. int _value = 0;
  14. @override
  15. Widget build(BuildContext context) {
  16. return Scaffold(
  17. body: SingleChildScrollView(
  18. child: Column(
  19. children: <Widget>[
  20. Stack(
  21. children: [
  22. WavyHeader(),
  23. Container(
  24. margin: EdgeInsets.only(top: 90),
  25. padding: EdgeInsets.fromLTRB(20, 5, 25, 5),
  26. child: Row(
  27. mainAxisAlignment: MainAxisAlignment.end,
  28. crossAxisAlignment: CrossAxisAlignment.end,
  29. children: [
  30. Text(
  31. 'Reimburse\t\t',
  32. maxLines: 1,
  33. style: GoogleFonts.luckiestGuy(
  34. fontSize: 28,
  35. color: Colors.red,
  36. fontStyle: FontStyle.italic,
  37. ),
  38. ),
  39. Image.asset(
  40. 'assets/icons/menu/ic_refund.png',
  41. width: 40,
  42. height: 40,
  43. ),
  44. ],
  45. )),
  46. SafeArea(
  47. child: Container(
  48. width: MediaQuery.of(context).size.width,
  49. margin: EdgeInsets.only(
  50. top: MediaQuery.of(context).size.height / 5,
  51. left: 10,
  52. right: 10,
  53. ),
  54. child: Column(
  55. children: [
  56. InkWell(
  57. child: Container(
  58. margin: EdgeInsets.only(top: 15, bottom: 15),
  59. padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
  60. width: double.infinity,
  61. decoration: BoxDecoration(
  62. borderRadius: BorderRadius.circular(5),
  63. gradient: LinearGradient(colors: [
  64. Color(0xFF2D4059),
  65. Color(0xFF2D4059),
  66. /*Color(0xFFEAFFD0),
  67. Color(0xFF95E1D3),*/
  68. ])),
  69. child: Row(
  70. mainAxisAlignment: MainAxisAlignment.center,
  71. children: [
  72. Text('Lihat Riwayat Reimburse\t\t',
  73. textAlign: TextAlign.center,
  74. style: TextStyle(
  75. color: Colors.white,
  76. fontSize: 17,
  77. fontWeight: FontWeight.w500)),
  78. Image.asset(
  79. 'assets/images/ic_history.png',
  80. width: 30,
  81. height: 30,
  82. )
  83. ],
  84. )),
  85. onTap: () {},
  86. ),
  87. Container(
  88. child: Card(
  89. elevation: 10,
  90. child: Container(
  91. decoration: BoxDecoration(
  92. color: Color(0XFFFAF7EE),
  93. borderRadius: BorderRadius.circular(10)),
  94. child: Column(
  95. children: [
  96. Container(
  97. margin: EdgeInsets.only(
  98. left: 10, right: 10, top: 10, bottom: 10),
  99. child: Row(
  100. children: [
  101. Expanded(
  102. flex: 3,
  103. child: Text(
  104. 'Kategori\t:\t',
  105. style: GoogleFonts.inconsolata(
  106. fontSize: 17),
  107. )),
  108. Expanded(
  109. flex: 7,
  110. child: Container(
  111. decoration: BoxDecoration(
  112. color:
  113. CupertinoColors.systemGrey2,
  114. borderRadius:
  115. BorderRadius.circular(5)),
  116. child: DropdownButton(
  117. value: this.selectedCategory,
  118. isExpanded: true,
  119. underline: SizedBox(),
  120. hint: Text(
  121. '\t\t\tPilih Kategori',
  122. style: TextStyle(
  123. color: Colors.black54),
  124. ),
  125. onChanged: (value) {
  126. print(value);
  127. setState(() {
  128. selectedCategory = value!;
  129. });
  130. },
  131. items: reimburseCategory
  132. .map(
  133. (e) => DropdownMenuItem(
  134. value: e,
  135. child:
  136. Text("\t\t\t" + e)),
  137. )
  138. .toList(),
  139. ),
  140. )),
  141. ],
  142. ),
  143. ),
  144. Container(
  145. margin: EdgeInsets.only(
  146. left: 10, right: 10, top: 10, bottom: 10),
  147. child: Column(
  148. children: [
  149. Row(
  150. children: [
  151. Expanded(
  152. flex: 3,
  153. child: Text(
  154. 'Tanggal\t:\t',
  155. style: GoogleFonts.inconsolata(
  156. fontSize: 17),
  157. )),
  158. Expanded(
  159. flex: 7,
  160. child: Container(
  161. decoration: BoxDecoration(
  162. color: CupertinoColors
  163. .systemGrey2,
  164. borderRadius:
  165. BorderRadius.circular(
  166. 5)),
  167. child: Column(
  168. children: [
  169. DropdownButton(
  170. value: this.selectedDate,
  171. isExpanded: true,
  172. underline: SizedBox(),
  173. hint: Text(
  174. '\t\t\tPilih Tanggal',
  175. style: TextStyle(
  176. color:
  177. Colors.black54),
  178. ),
  179. onChanged: (value) {
  180. print(value);
  181. setState(() {
  182. selectedDate = value!;
  183. });
  184. },
  185. items: reimburseCategory
  186. .map(
  187. (e) =>
  188. DropdownMenuItem(
  189. value: e,
  190. child: Text(
  191. "\t\t\t" +
  192. e)),
  193. )
  194. .toList(),
  195. ),
  196. ],
  197. ),
  198. )),
  199. ],
  200. ),
  201. ],
  202. ),
  203. ),
  204. Container(
  205. margin: EdgeInsets.only(
  206. left: 10, right: 10, top: 10, bottom: 10),
  207. child: Row(
  208. children: [
  209. Expanded(
  210. flex: 3,
  211. child: Text(
  212. 'Total Harga\t:\t',
  213. style: GoogleFonts.inconsolata(
  214. fontSize: 17),
  215. )),
  216. Expanded(
  217. flex: 7,
  218. child: Container(
  219. decoration: BoxDecoration(
  220. color: Colors.white,
  221. borderRadius:
  222. BorderRadius.circular(5)),
  223. child: Padding(
  224. padding: EdgeInsets.only(
  225. left: 10,
  226. right: 10,
  227. top: 5,
  228. bottom: 5),
  229. child: TextFormField(
  230. keyboardType:
  231. TextInputType.number,
  232. maxLines: 1,
  233. textInputAction:
  234. TextInputAction.next,
  235. decoration: InputDecoration(
  236. border:
  237. InputBorder.none,
  238. hintText:
  239. "Masukkan tanpa tanda baca (.) atau (,)")),
  240. ))),
  241. ],
  242. ),
  243. ),
  244. Container(
  245. margin: EdgeInsets.only(
  246. left: 10, right: 10, top: 10, bottom: 10),
  247. child: Row(
  248. children: [
  249. Expanded(
  250. flex: 3,
  251. child: Text(
  252. 'Deskripsi\t:\t',
  253. style: GoogleFonts.inconsolata(
  254. fontSize: 17),
  255. )),
  256. Expanded(
  257. flex: 7,
  258. child: Container(
  259. decoration: BoxDecoration(
  260. color: Colors.white,
  261. borderRadius:
  262. BorderRadius.circular(5)),
  263. child: Padding(
  264. padding: EdgeInsets.only(
  265. left: 10,
  266. right: 10,
  267. top: 5,
  268. bottom: 5),
  269. child: TextFormField(
  270. keyboardType:
  271. TextInputType.multiline,
  272. maxLines: null,
  273. textInputAction:
  274. TextInputAction.done,
  275. decoration: InputDecoration(
  276. border:
  277. InputBorder.none,
  278. hintText: "Deskripsi")),
  279. ))),
  280. ],
  281. ),
  282. ),
  283. Container(
  284. margin: EdgeInsets.only(
  285. left: 10, right: 10, top: 10, bottom: 10),
  286. child: Column(
  287. children: [
  288. Row(
  289. children: [
  290. Expanded(
  291. flex: 3,
  292. child: Text(
  293. 'Pembayaran\t:',
  294. style: GoogleFonts.inconsolata(
  295. fontSize: 17),
  296. )),
  297. Expanded(
  298. flex: 7,
  299. child: Container(
  300. child: Column(
  301. children: [
  302. Row(
  303. children: [
  304. Radio(
  305. value: 1,
  306. groupValue: _value,
  307. onChanged: (value) {
  308. setState(() {
  309. _value = value!;
  310. });
  311. },
  312. ),
  313. Flexible(
  314. child: Text(
  315. "Karyawan (Perlu Reimburse)",
  316. style:
  317. TextStyle(
  318. color: Colors
  319. .black54,
  320. ))),
  321. ],
  322. ),
  323. Row(
  324. children: [
  325. Radio(
  326. value: 2,
  327. groupValue: _value,
  328. onChanged: (value) {
  329. setState(() {
  330. _value = value!;
  331. });
  332. },
  333. ),
  334. Flexible(
  335. child: Text(
  336. "Perusahaan",
  337. style: TextStyle(
  338. color: Colors
  339. .black54)))
  340. ],
  341. ),
  342. ],
  343. ),
  344. )),
  345. ],
  346. ),
  347. ],
  348. ),
  349. ),
  350. Container(
  351. margin: EdgeInsets.only(
  352. left: 10, right: 10, top: 10, bottom: 10),
  353. child: Column(
  354. children: [
  355. Row(
  356. children: [
  357. Expanded(
  358. flex: 3,
  359. child: Text(
  360. 'Lampiran\t:\t',
  361. style: GoogleFonts.inconsolata(
  362. fontSize: 17),
  363. ),
  364. ),
  365. Expanded(
  366. flex: 7,
  367. child: Container(
  368. child: ElevatedButton(
  369. onPressed: () {},
  370. child: Container(
  371. width: double.infinity,
  372. child: Text("Pilih File"),
  373. ),
  374. ),
  375. ),
  376. )
  377. ],
  378. ),
  379. Row(
  380. children: [
  381. Expanded(
  382. flex: 3,
  383. child: Text(
  384. '',
  385. style: GoogleFonts.inconsolata(
  386. fontSize: 17),
  387. ),
  388. ),
  389. Expanded(
  390. flex: 7,
  391. child: Visibility(
  392. visible: true,
  393. child: Container(
  394. alignment:
  395. Alignment.centerLeft,
  396. margin: EdgeInsets.only(
  397. left: 15,
  398. right: 15,
  399. bottom: 10),
  400. child: Flexible(
  401. child: Text(
  402. "Selected File",
  403. style: TextStyle(
  404. color:
  405. Colors.black54),
  406. ),
  407. ),
  408. )),
  409. )
  410. ],
  411. ),
  412. InkWell(
  413. child: Container(
  414. padding: EdgeInsets.fromLTRB(
  415. 10, 10, 10, 10),
  416. width: double.infinity,
  417. decoration: BoxDecoration(
  418. borderRadius:
  419. BorderRadius.circular(5),
  420. gradient: LinearGradient(colors: [
  421. Color(0xFFFF9945),
  422. Color(0xFFFc6076)
  423. ])),
  424. child: Text('Ajukan',
  425. textAlign: TextAlign.center,
  426. style: TextStyle(
  427. color: Colors.white,
  428. fontSize: 17,
  429. fontWeight: FontWeight.w500)),
  430. ),
  431. onTap: () {},
  432. )
  433. ],
  434. ),
  435. ),
  436. ],
  437. ),
  438. ),
  439. ),
  440. ),
  441. ],
  442. ),
  443. ),
  444. ),
  445. ],
  446. ),
  447. ],
  448. )),
  449. );
  450. }
  451. }
  452. List<String> reimburseCategory = [
  453. "Paid Time Off",
  454. "Sick Time Off",
  455. "Compensatory Days",
  456. "Unpaid"
  457. ];