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.

25 lines
467B

  1. import 'package:farm_tpf/models/Supply.dart';
  2. import 'package:get/get.dart';
  3. class ChangeSupply extends GetxController {
  4. Supply currentSupply;
  5. int selectedSupplyId;
  6. void initValue() {
  7. currentSupply = Supply();
  8. selectedSupplyId = -1;
  9. update();
  10. }
  11. void change(Supply supply) {
  12. currentSupply = supply;
  13. selectedSupplyId = supply.id;
  14. update();
  15. }
  16. void changeById(int supplyId) {
  17. selectedSupplyId = supplyId;
  18. update();
  19. }
  20. }