feed_back_controller.dart 744 B

1234567891011121314151617181920212223242526272829303132
  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. @injectable
  8. class FeedBackController extends BaseController {
  9. final RxString _content = RxString('');
  10. String get content => _content.value;
  11. void back() {
  12. Get.back();
  13. }
  14. set content(String value) {
  15. _content.value = value;
  16. }
  17. void submit() {
  18. if (content.isEmpty) {
  19. ToastUtil.show(StringName.feedBackHint);
  20. return;
  21. }
  22. ToastUtil.show(StringName.feedBackSuccess);
  23. Get.back();
  24. }
  25. void onCustomerServiceClick() {}
  26. }