Ingen beskrivning
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

surattugas_screen.dart 25KB

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