import 'package:domain/constants/api_constants.dart'; import 'package:get/get.dart'; import 'package:plugin_basic/constants/app_constant.dart'; import 'package:plugin_basic/service/app_config_service.dart'; import 'package:plugin_basic/service/http_provider_injection.dart'; import 'package:plugin_platform/engine/sp/sp_util.dart'; class SelectCountryController extends GetxController { //设置下一步 void setupNext() { int country = ConfigService.to.curSelectCountry.value; SPUtil.putInt(AppConstant.storageSelectedCountry, country); String baseUrl; if (country == 1){ //新加坡 baseUrl = ApiConstants.sgBaseUrl; }else { baseUrl = ApiConstants.baseUrl; } HttpProviderInjection.switchBaseUrl(baseUrl); Get.back(); } }