feed_back_controller.dart 827 B

123456789101112131415161718192021222324252627282930313233343536
  1. import 'package:get/get.dart';
  2. import 'package:get/get_core/src/get_main.dart';
  3. import 'package:injectable/injectable.dart';
  4. import 'package:location/base/base_controller.dart';
  5. import 'package:location/resource/string.gen.dart';
  6. import 'package:location/utils/toast_util.dart';
  7. import '../../sdk/qiyu/qi_yu_helper.dart';
  8. @injectable
  9. class FeedBackController extends BaseController {
  10. final RxString _content = RxString('');
  11. String get content => _content.value;
  12. void back() {
  13. Get.back();
  14. }
  15. set content(String value) {
  16. _content.value = value;
  17. }
  18. void submit() {
  19. if (content.isEmpty) {
  20. ToastUtil.show(StringName.feedBackHint);
  21. return;
  22. }
  23. ToastUtil.show(StringName.feedBackSuccess);
  24. Get.back();
  25. }
  26. void onCustomerServiceClick() {
  27. QiYuHelper.openCustomService();
  28. }
  29. }