setEnvironment static method
dynamic
setEnvironment({})
Implementation
static setEnvironment({
FastAppEnvironment environment = FastAppEnvironment.product,
bool showLog = false,
String proxy = '',
bool grpc = false,
bool restful = true,
String devAddress = '',
String testAddress = '',
String productAddress = '',
String guestAddress = '',
String version = '',
}) async {
WidgetsFlutterBinding.ensureInitialized();
fastVersion = version;
currentEnvironment = environment;
environmentConfig = new EnvironmentConfig(
environment: environment,
showLog: showLog,
proxy: proxy,
grpc: grpc,
restful: restful,
);
fastApiHostConfig = new FastApiHostConfig(
devAddress: devAddress,
testAddress: testAddress,
productAddress: productAddress,
geustAddress: guestAddress,
);
String? e = await getStoreValue("GeustEnvironment");
if(FastData.isLogin && e == '1'){
FastApp.setGeustEnvironment();
}
}