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.
|
- import 'package:farm_tpf/custom_model/Supply.dart';
- import 'package:get/get.dart';
-
- class ChangeSupply extends GetxController {
- Supply currentSupply;
- int selectedSupplyId;
- String selectedSupplyName;
-
- void initValue() {
- currentSupply = Supply();
- selectedSupplyId = -1;
- update();
- }
-
- void change(Supply supply) {
- currentSupply = supply;
- selectedSupplyId = supply.id;
- selectedSupplyName = supply.tbSuppliesName;
- update();
- }
-
- void changeByIdAndName(int supplyId, String supplyName) {
- selectedSupplyId = supplyId;
- selectedSupplyName = supplyName;
- update();
- }
- }
|