app.dart 635 B

1234567891011121314151617181920212223242526272829303132333435
  1. import 'package:get/get.dart';
  2. import '../defines.dart';
  3. class AppState extends StateModuleBase {
  4. final _busy = false.obs;
  5. /// 程序处理是否忙碌中
  6. bool get busy => _busy.value;
  7. set busy(bool v) {
  8. _busy.value = v;
  9. if (v) {
  10. // PromptBox.loading();
  11. } else {
  12. // PromptBox.dismiss();
  13. }
  14. }
  15. void setBusy(String text) {
  16. _busy.value = true;
  17. // PromptBox.loading(text);
  18. }
  19. void cancelBusy() => busy = false;
  20. @override
  21. Future<void> acceptPersistenceJson(Map<String, dynamic> map) async {
  22. //
  23. }
  24. @override
  25. Map<String, dynamic> toPersistenceJson() {
  26. return {};
  27. }
  28. }