setting_controller.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import 'package:cpt_auth/modules/reset_psd/reset_psd_page.dart';
  2. import 'package:get/get.dart';
  3. import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
  4. import 'package:plugin_platform/engine/toast/toast_engine.dart';
  5. import 'package:widgets/dialog/app_default_dialog.dart';
  6. import 'setting_state.dart';
  7. class SettingController extends GetxController {
  8. final SettingState state = SettingState();
  9. //切换账号
  10. void switchProjects() {
  11. ToastEngine.show("切换账号");
  12. }
  13. //去重置密码页面
  14. void gotoResetPasswordPage() {
  15. ResetPasswordPage.startInstance();
  16. }
  17. //确定删除账号
  18. void doAccountDelete() {
  19. DialogEngine.show(
  20. widget: AppDefaultDialog(
  21. title: "Confirmation".tr,
  22. message: "Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request.".tr,
  23. confirmAction: () {
  24. ToastEngine.show("确定删除账号");
  25. },
  26. ));
  27. }
  28. //确定退出登录
  29. void doLogout() {
  30. DialogEngine.show(
  31. widget: AppDefaultDialog(
  32. title: "Confirmation".tr,
  33. message: "Are you sure you need to exit the system?".tr,
  34. confirmAction: () {
  35. ToastEngine.show("确定退出登录");
  36. },
  37. ));
  38. }
  39. }