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.

615 lines
29KB

  1. import 'package:farm_tpf/custom_model/Device.dart';
  2. import 'package:farm_tpf/custom_model/SuppliesUsing.dart';
  3. import 'package:farm_tpf/custom_model/Supply.dart';
  4. import 'package:farm_tpf/presentation/custom_widgets/WidgetErrorTextField.dart';
  5. import 'package:farm_tpf/presentation/custom_widgets/widget_text_form_field.dart';
  6. import 'package:farm_tpf/presentation/custom_widgets/widget_utils.dart';
  7. import 'package:farm_tpf/presentation/screens/actions/controller/ChangeDevice.dart';
  8. import 'package:farm_tpf/presentation/screens/actions/controller/ChangeFieldInForm.dart';
  9. import 'package:farm_tpf/presentation/screens/actions/controller/ChangeFormButton.dart';
  10. import 'package:farm_tpf/presentation/screens/actions/controller/ChangeSupplyUsing.dart';
  11. import 'package:farm_tpf/presentation/screens/actions/controller/ChangeUnit.dart';
  12. import 'package:farm_tpf/presentation/screens/actions/resource_device_activity/sc_device_activity.dart';
  13. import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_supply.dart';
  14. import 'package:farm_tpf/presentation/screens/resources/sc_resource_helper.dart';
  15. import 'package:farm_tpf/utils/const_common.dart';
  16. import 'package:farm_tpf/utils/const_string.dart';
  17. import 'package:farm_tpf/utils/const_style.dart';
  18. import 'package:farm_tpf/utils/validators.dart';
  19. import 'package:flutter/material.dart';
  20. import 'package:get/get.dart';
  21. import 'package:farm_tpf/utils/formatter.dart';
  22. import '../util_action.dart';
  23. class WidgetSprayingSupply extends StatefulWidget {
  24. final List<SuppliesUsing>? currentItems;
  25. final Function(List<SuppliesUsing> supplyChanges) onChangeSupplies;
  26. final String urlSupply;
  27. WidgetSprayingSupply({required this.urlSupply, this.currentItems, required this.onChangeSupplies});
  28. @override
  29. _WidgetSprayingSupplyState createState() => _WidgetSprayingSupplyState();
  30. }
  31. class _WidgetSprayingSupplyState extends State<WidgetSprayingSupply> {
  32. final _dosageController = TextEditingController();
  33. final _quantityController = TextEditingController();
  34. final _howToUseController = TextEditingController();
  35. final changeSelectedSupply = Get.put(ChangeSupply());
  36. final changeSupplyUsing = Get.put(ChangeSupplyUsing());
  37. final changeUnit = Get.put(ChangeUnit());
  38. final changeButton = Get.put(ChangeButtonInForm());
  39. final changeSelectedDevice = Get.put(ChangeDevice());
  40. final changeFormField = Get.put(ChangeFieldFormSupply());
  41. GlobalKey<FormState> _formSupplyKey = GlobalKey();
  42. @override
  43. void initState() {
  44. super.initState();
  45. changeSelectedSupply.initValue();
  46. changeSelectedDevice.initValue();
  47. changeSupplyUsing.init(widget.currentItems ?? []);
  48. changeUnit.initValue();
  49. changeButton.resetValue();
  50. changeFormField.init();
  51. }
  52. Widget _buildListSupply() {
  53. return GetBuilder<ChangeSupplyUsing>(
  54. init: changeSupplyUsing,
  55. builder: (value) {
  56. widget.onChangeSupplies(value.currentItems ?? []);
  57. if ((value.currentItems ?? []).isEmpty) {
  58. return Container();
  59. } else {
  60. return Container(
  61. height: 120,
  62. child: ListView.builder(
  63. physics: ClampingScrollPhysics(),
  64. scrollDirection: Axis.horizontal,
  65. shrinkWrap: true,
  66. itemCount: value.currentItems?.length,
  67. itemBuilder: (context, index) {
  68. return GestureDetector(
  69. onTap: () {
  70. print("edit");
  71. changeSupplyUsing.changeIndexEdit(index);
  72. changeButton.updateToEdit(true);
  73. var editedSupplyUsing = value.currentItems?[index];
  74. var editedSupply = Supply()
  75. ..id = editedSupplyUsing?.tbSuppliesInWarehouseId ?? -1
  76. ..tbSuppliesName = editedSupplyUsing?.supplyName ?? ''
  77. ..unit = editedSupplyUsing?.supplyUnit ?? '';
  78. changeSelectedSupply.change(editedSupply);
  79. var editedDevice = Device()
  80. ..id = editedSupplyUsing?.tbEquipmentOfCustomerId
  81. ..name = editedSupplyUsing?.equipmentName;
  82. changeSelectedDevice.change(editedDevice);
  83. changeUnit.updateListByUnitName(editedSupplyUsing?.supplyUnit ?? '');
  84. changeUnit.updateSelected(editedSupplyUsing?.supplyUnit ?? '');
  85. _dosageController.text = editedSupplyUsing?.dosage ?? '';
  86. _howToUseController.text = editedSupplyUsing?.howToUse ?? '';
  87. _quantityController.text = editedSupplyUsing?.quantity?.formatNumtoStringDecimal() ?? '';
  88. },
  89. child: Card(
  90. child: Stack(
  91. alignment: Alignment.bottomCenter,
  92. children: <Widget>[
  93. Positioned(
  94. child: ClipRRect(
  95. borderRadius: BorderRadius.circular(8),
  96. child: Container(
  97. padding: EdgeInsets.all(4),
  98. width: 150,
  99. child: Column(
  100. mainAxisAlignment: MainAxisAlignment.center,
  101. children: [
  102. SizedBox(
  103. height: 12.0,
  104. ),
  105. Flexible(
  106. child: Text(value.currentItems?[index].supplyName ?? "", overflow: TextOverflow.ellipsis, maxLines: 1),
  107. ),
  108. Validators.stringNotNullOrEmpty(value.currentItems?[index].dosage ?? '')
  109. ? Flexible(child: Text("${value.currentItems?[index].dosage ?? ""}"))
  110. : SizedBox(),
  111. Validators.stringNotNullOrEmpty(
  112. value.currentItems?[index].quantity?.formatNumtoStringDecimal() ?? '',
  113. )
  114. ? Flexible(
  115. child: Text(
  116. "${value.currentItems?[index].quantity?.formatNumtoStringDecimal() ?? ""} ${value.currentItems?[index].supplyUnit ?? ""}"))
  117. : SizedBox(),
  118. Validators.stringNotNullOrEmpty(value.currentItems?[index].equipmentName ?? '')
  119. ? Flexible(child: Text("${value.currentItems?[index].equipmentName ?? ""}"))
  120. : SizedBox(),
  121. Validators.stringNotNullOrEmpty(value.currentItems?[index].howToUse ?? '')
  122. ? Flexible(child: Text("${value.currentItems?[index].howToUse ?? ""}"))
  123. : SizedBox(),
  124. ],
  125. ),
  126. ),
  127. )),
  128. Positioned(
  129. top: -10,
  130. right: -10,
  131. child: IconButton(
  132. icon: Icon(
  133. Icons.cancel,
  134. color: Colors.redAccent,
  135. ),
  136. onPressed: () {
  137. changeSupplyUsing.deleteSupply(index);
  138. }),
  139. )
  140. ],
  141. )));
  142. }));
  143. }
  144. });
  145. }
  146. Widget _btnSelectSubstrates() {
  147. return GetBuilder<ChangeSupply>(
  148. init: changeSelectedSupply,
  149. builder: (data) {
  150. return TextButton(
  151. onPressed: () {
  152. var currentIndexEdit = changeSupplyUsing.currentIndex;
  153. Navigator.of(context)
  154. .push(MaterialPageRoute(
  155. builder: (_) => ResourceHelperScreen(
  156. titleName: "Thuốc BVTV",
  157. urlSupply: widget.urlSupply,
  158. selectedId: changeSelectedSupply.selectedSupplyId ?? -1,
  159. currentItems: changeSupplyUsing.currentItems ?? [],
  160. currentEditId: ((currentIndexEdit ?? -1) >= 0)
  161. ? (changeSupplyUsing.currentItems ?? [])[(currentIndexEdit ?? 0)].tbSuppliesInWarehouseId ?? -1
  162. : -1,
  163. ),
  164. fullscreenDialog: false))
  165. .then((value) {
  166. if (value != null) {
  167. var result = value as Supply;
  168. changeSelectedSupply.change(result);
  169. changeUnit.updateListByUnitName(result.unit ?? '');
  170. changeFormField.change(true);
  171. }
  172. });
  173. },
  174. child: GetBuilder<ChangeSupply>(
  175. init: changeSelectedSupply,
  176. builder: (_) {
  177. var isValid = changeSelectedSupply.isValid;
  178. return Column(
  179. crossAxisAlignment: CrossAxisAlignment.start,
  180. children: [
  181. Container(
  182. padding: EdgeInsets.only(top: 0.0, right: 0.0, bottom: 10.5, left: 0.0),
  183. decoration: BoxDecoration(
  184. border: Border(
  185. bottom: BorderSide(
  186. width: 1,
  187. color: (isValid ?? false) ? Colors.grey : Colors.red,
  188. ),
  189. ),
  190. ),
  191. child: Column(
  192. crossAxisAlignment: CrossAxisAlignment.start,
  193. children: [
  194. Validators.stringNotNullOrEmpty(changeSelectedSupply.selectedSupplyName ?? '')
  195. ? Text(
  196. 'Tên thương mại *',
  197. style: TextStyle(
  198. fontSize: 13,
  199. fontWeight: FontWeight.normal,
  200. color: (isValid ?? false) ? Colors.black54 : Colors.red[600]),
  201. )
  202. : Text(
  203. '',
  204. style: TextStyle(
  205. fontSize: 13,
  206. fontWeight: FontWeight.normal,
  207. color: (isValid ?? false) ? Colors.black54 : Colors.red,
  208. ),
  209. ),
  210. Row(
  211. children: [
  212. Expanded(
  213. child: Validators.stringNotNullOrEmpty(changeSelectedSupply.selectedSupplyName ?? '')
  214. ? Text(
  215. changeSelectedSupply.selectedSupplyName ?? '',
  216. style: TextStyle(
  217. fontSize: 14.0,
  218. color: Colors.black87,
  219. ),
  220. )
  221. : Text("Tên thương mại *", style: TextStyle(fontSize: 14.0, color: Colors.black54)),
  222. ),
  223. Icon(
  224. Icons.arrow_drop_down,
  225. color: Colors.grey,
  226. ),
  227. ],
  228. ),
  229. ],
  230. )),
  231. (isValid ?? false) ? SizedBox() : WidgetErrorTextField()
  232. ],
  233. );
  234. }));
  235. });
  236. }
  237. Widget _btnSelectDevice() {
  238. return GetBuilder<ChangeDevice>(
  239. init: changeSelectedDevice,
  240. builder: (data) {
  241. return TextButton(
  242. onPressed: () {
  243. Navigator.of(context)
  244. .push(
  245. MaterialPageRoute(
  246. builder: (_) => ListDeviceActivity(
  247. selectedId: changeSelectedDevice.selectedDeviceId ?? -1,
  248. ),
  249. fullscreenDialog: false,
  250. ),
  251. )
  252. .then((value) {
  253. if (value != null) {
  254. var result = value as Device;
  255. changeSelectedDevice.change(result);
  256. changeFormField.change(true);
  257. }
  258. });
  259. },
  260. child: Container(
  261. padding: EdgeInsets.only(top: 0.0, right: 0.0, bottom: 10.5, left: 0.0),
  262. decoration: BoxDecoration(
  263. border: kBorderTextField,
  264. ),
  265. child: Column(
  266. crossAxisAlignment: CrossAxisAlignment.start,
  267. children: [
  268. Validators.stringNotNullOrEmpty(changeSelectedDevice.selectedDeviceName ?? '')
  269. ? Text(
  270. 'Thiết bị',
  271. style: TextStyle(fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black45),
  272. )
  273. : Text(
  274. '',
  275. style: TextStyle(fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black54),
  276. ),
  277. Row(
  278. children: [
  279. GetBuilder<ChangeSupply>(
  280. init: changeSelectedSupply,
  281. builder: (_) => Expanded(
  282. child: Validators.stringNotNullOrEmpty(changeSelectedDevice.selectedDeviceName ?? '')
  283. ? Text(changeSelectedDevice.selectedDeviceName ?? '', style: TextStyle(fontSize: 14.0, color: Colors.black87))
  284. : Text("Thiết bị", style: TextStyle(fontSize: 14.0, color: Colors.black54)),
  285. )),
  286. Icon(
  287. Icons.arrow_drop_down,
  288. color: Colors.grey,
  289. ),
  290. ],
  291. ),
  292. ],
  293. )));
  294. });
  295. }
  296. Widget _dropdownUnitTypes() {
  297. return GetBuilder<ChangeUnit>(
  298. init: changeUnit,
  299. builder: (data) {
  300. return DropdownButtonFormField<String>(
  301. itemHeight: 100,
  302. value: (data.selectedUnit ?? '').isEmpty ? null : data.selectedUnit,
  303. items: (data.currentUnits ?? [])
  304. .map((label) => DropdownMenuItem(
  305. child: Text(label),
  306. value: label,
  307. ))
  308. .toList(),
  309. onChanged: (value) {
  310. var currentQuantity = _quantityController.text;
  311. num assignValue = currentQuantity.parseDoubleThousand();
  312. if (assignValue != null) {
  313. var oldSelected = data.selectedUnit;
  314. if (oldSelected == value) {
  315. } else {
  316. assignValue = UtilAction.convertUnit(
  317. inputValue: assignValue,
  318. oldUnit: oldSelected ?? '',
  319. newUnit: value ?? '',
  320. );
  321. }
  322. _quantityController.text = assignValue.formatNumtoStringDecimal();
  323. }
  324. changeUnit.updateSelected(value ?? '');
  325. },
  326. );
  327. });
  328. }
  329. _quantityField() {
  330. return WidgetTextFormFieldNumber(
  331. hintValue: "Tổng lượng sử dụng *",
  332. labelText: "Tổng lượng sử dụng *",
  333. textController: _quantityController,
  334. validator: (String? value) {
  335. return Validators.validateNotNullOrEmpty(value ?? '', label_validate_input_empty);
  336. },
  337. onChanged: (value) {
  338. if (!Validators.stringNotNullOrEmpty(value ?? '') &&
  339. !Validators.stringNotNullOrEmpty(_howToUseController.text) &&
  340. !Validators.stringNotNullOrEmpty(_dosageController.text) &&
  341. (Get.find<ChangeSupply>().selectedSupplyId ?? -1) <= 0 &&
  342. (changeSelectedDevice.selectedDeviceId ?? -1) <= 0) {
  343. changeFormField.change(false);
  344. } else {
  345. changeFormField.change(true);
  346. }
  347. },
  348. );
  349. }
  350. _buttonInForm() {
  351. return GetBuilder<ChangeButtonInForm>(
  352. init: changeButton,
  353. builder: (_) {
  354. return Row(
  355. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  356. children: [
  357. _.isEdit ?? false
  358. ? TextButton(
  359. child: Text("Huỷ"),
  360. onPressed: () {
  361. changeButton.resetValue();
  362. _resetForm();
  363. _hidenKeyboard(context);
  364. })
  365. : SizedBox(),
  366. _.isEdit ?? false
  367. ? Expanded(
  368. child: TextButton(
  369. onPressed: () {
  370. if (_formSupplyKey.currentState!.validate()) {
  371. _formSupplyKey.currentState!.save();
  372. if ((changeSelectedSupply.selectedSupplyId ?? -1) <= 0) {
  373. changeSelectedSupply.changeValid(false);
  374. } else {
  375. changeSelectedSupply.changeValid(true);
  376. }
  377. var currentSupply = changeSelectedSupply.currentSupply;
  378. var currentDevice = changeSelectedDevice.currentDevice;
  379. var currentQuantity = _quantityController.text.parseDoubleThousand();
  380. if (currentSupply?.id != null && (currentQuantity ?? 0) > 0) {
  381. var quantityWithCurrentSupplyUnit = UtilAction.convertUnit(
  382. inputValue: currentQuantity,
  383. oldUnit: changeUnit.selectedUnit ?? '',
  384. newUnit: changeSelectedSupply.currentSupply?.unit ?? '',
  385. );
  386. SuppliesUsing newSup = SuppliesUsing()
  387. ..dosage = _dosageController.text
  388. ..howToUse = _howToUseController.text
  389. ..quantity = quantityWithCurrentSupplyUnit
  390. ..tbSuppliesInWarehouseId = currentSupply?.id
  391. ..suppliesInWarehouseId = currentSupply?.id
  392. ..supplyName = currentSupply?.tbSuppliesName
  393. ..tbEquipmentOfCustomerId = currentDevice?.id ?? -1
  394. ..equipmentOfCustomerId = currentDevice?.id ?? -1
  395. ..equipmentName = currentDevice?.name ?? ''
  396. ..supplyUnit = currentSupply?.unit
  397. ..unit = currentSupply?.unit;
  398. changeSupplyUsing.editSupply(changeSupplyUsing.currentIndex ?? -1, newSup);
  399. _resetForm();
  400. _hidenKeyboard(context);
  401. } else if (currentSupply?.id == null || ((currentQuantity ?? 0) <= 0)) {
  402. Utils.showSnackBarWarning(message: "Vui lòng nhập vật tư và số lượng");
  403. }
  404. } else {
  405. Utils.showSnackBarWarning(message: "Vui lòng nhập vật tư và số lượng");
  406. if ((changeSelectedSupply.selectedSupplyId ?? -1) <= 0) {
  407. changeSelectedSupply.changeValid(false);
  408. } else {
  409. changeSelectedSupply.changeValid(true);
  410. }
  411. }
  412. },
  413. child: Text(
  414. "Sửa thuốc BVTV",
  415. style: TextStyle(color: Colors.blue),
  416. )),
  417. )
  418. : Expanded(
  419. child: TextButton(
  420. onPressed: () {
  421. if (_formSupplyKey.currentState!.validate()) {
  422. _formSupplyKey.currentState!.save();
  423. if ((changeSelectedSupply.selectedSupplyId ?? -1) <= 0) {
  424. changeSelectedSupply.changeValid(false);
  425. } else {
  426. changeSelectedSupply.changeValid(true);
  427. }
  428. var currentSupply = changeSelectedSupply.currentSupply;
  429. var currentDevice = changeSelectedDevice.currentDevice;
  430. var currentQuantity = _quantityController.text.parseDoubleThousand();
  431. if (currentSupply?.id != null && (currentQuantity ?? 0) > 0) {
  432. var quantityWithCurrentSupplyUnit = UtilAction.convertUnit(
  433. inputValue: currentQuantity,
  434. oldUnit: changeUnit.selectedUnit ?? '',
  435. newUnit: changeSelectedSupply.currentSupply?.unit ?? '',
  436. );
  437. SuppliesUsing newSup = SuppliesUsing()
  438. ..dosage = _dosageController.text
  439. ..howToUse = _howToUseController.text
  440. ..quantity = quantityWithCurrentSupplyUnit
  441. ..tbSuppliesInWarehouseId = currentSupply?.id
  442. ..suppliesInWarehouseId = currentSupply?.id
  443. ..supplyName = currentSupply?.tbSuppliesName
  444. ..supplyUnit = currentSupply?.unit
  445. ..tbEquipmentOfCustomerId = currentDevice?.id ?? -1
  446. ..equipmentOfCustomerId = currentDevice?.id ?? -1
  447. ..equipmentName = currentDevice?.name ?? ''
  448. ..unit = currentSupply?.unit;
  449. changeSupplyUsing.addSupply(newSup);
  450. _resetForm();
  451. _hidenKeyboard(context);
  452. } else if (currentSupply?.id == null || ((currentQuantity ?? 0) <= 0)) {
  453. Utils.showSnackBarWarning(message: "Vui lòng nhập vật tư và số lượng");
  454. }
  455. } else {
  456. Utils.showSnackBarWarning(message: "Vui lòng nhập vật tư và số lượng");
  457. if ((changeSelectedSupply.selectedSupplyId ?? -1) <= 0) {
  458. changeSelectedSupply.changeValid(false);
  459. } else {
  460. changeSelectedSupply.changeValid(true);
  461. }
  462. }
  463. },
  464. child: Text(
  465. "+ Thêm thuốc BVTV",
  466. style: TextStyle(color: Colors.blue),
  467. )),
  468. )
  469. ],
  470. );
  471. });
  472. }
  473. Widget _formEdit() {
  474. return Form(
  475. key: _formSupplyKey,
  476. child: Column(
  477. children: [
  478. Container(
  479. padding: EdgeInsets.all(8.0),
  480. margin: EdgeInsets.all(8.0),
  481. decoration: BoxDecoration(
  482. shape: BoxShape.rectangle,
  483. borderRadius: BorderRadius.circular(10),
  484. color: Colors.white,
  485. border: Border.all(
  486. color: Colors.grey,
  487. ),
  488. ),
  489. child: Column(
  490. children: [
  491. _btnSelectSubstrates(),
  492. TextFormField(
  493. keyboardType: TextInputType.text,
  494. controller: _dosageController,
  495. decoration: InputDecoration(labelText: "Liều lượng sử dụng"),
  496. onSaved: (newValue) {},
  497. onChanged: (value) {
  498. if (!Validators.stringNotNullOrEmpty(_quantityController.text) &&
  499. !Validators.stringNotNullOrEmpty(_howToUseController.text) &&
  500. !Validators.stringNotNullOrEmpty(value) &&
  501. (Get.find<ChangeSupply>().selectedSupplyId ?? -1) <= 0 &&
  502. (changeSelectedDevice.selectedDeviceId ?? -1) <= 0) {
  503. changeFormField.change(false);
  504. } else {
  505. changeFormField.change(true);
  506. }
  507. },
  508. ),
  509. Row(
  510. mainAxisSize: MainAxisSize.min,
  511. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  512. crossAxisAlignment: CrossAxisAlignment.center,
  513. children: [
  514. Expanded(
  515. flex: 2,
  516. child: Container(
  517. height: 82,
  518. child: _quantityField(),
  519. ),
  520. ),
  521. SizedBox(
  522. width: 16.0,
  523. ),
  524. Expanded(
  525. flex: 1,
  526. child: Align(
  527. alignment: Alignment.bottomCenter,
  528. child: _dropdownUnitTypes(),
  529. )),
  530. ]),
  531. _btnSelectDevice(),
  532. TextFormField(
  533. keyboardType: TextInputType.text,
  534. controller: _howToUseController,
  535. decoration: InputDecoration(labelText: "Phương pháp sử dụng"),
  536. onSaved: (newValue) {},
  537. onChanged: (value) {
  538. if (!Validators.stringNotNullOrEmpty(_quantityController.text) &&
  539. !Validators.stringNotNullOrEmpty(value) &&
  540. !Validators.stringNotNullOrEmpty(_dosageController.text) &&
  541. (Get.find<ChangeSupply>().selectedSupplyId ?? -1) <= 0 &&
  542. (changeSelectedDevice.selectedDeviceId ?? -1) <= 0) {
  543. changeFormField.change(false);
  544. } else {
  545. changeFormField.change(true);
  546. }
  547. },
  548. ),
  549. ],
  550. ),
  551. ),
  552. _buttonInForm()
  553. ],
  554. ),
  555. );
  556. }
  557. _resetForm() {
  558. changeSupplyUsing.changeIndexEdit(-1);
  559. changeButton.resetValue();
  560. _dosageController.text = "";
  561. _howToUseController.text = "";
  562. _quantityController.text = "";
  563. changeUnit.initValue();
  564. changeSelectedSupply.initValue();
  565. changeSelectedDevice.initValue();
  566. changeFormField.change(false);
  567. }
  568. _hidenKeyboard(BuildContext context) {
  569. FocusScopeNode currentFocus = FocusScope.of(context);
  570. if (!currentFocus.hasPrimaryFocus) {
  571. currentFocus.unfocus();
  572. }
  573. }
  574. @override
  575. Widget build(BuildContext context) {
  576. return Column(
  577. crossAxisAlignment: CrossAxisAlignment.start,
  578. children: [
  579. Padding(
  580. padding: const EdgeInsets.all(8.0),
  581. child: Align(
  582. alignment: Alignment.centerLeft,
  583. child: Text(
  584. 'Thuốc BVTV',
  585. style: TextStyle(color: Colors.black54, fontSize: 14),
  586. ),
  587. ),
  588. ),
  589. _buildListSupply(),
  590. SizedBox(
  591. height: 8.0,
  592. ),
  593. _formEdit()
  594. ],
  595. );
  596. }
  597. }