getAppConfig method
to get business config data user need to use below API which returns config data
Implementation
Future<http.Response> getAppConfig() async {
Uri url = Uri.parse("$_baseUrl/business/app/config/$businessDomain");
http.Response response =
await http.Client().get(url, headers: kGetRequestHeader);
if (response.statusCode == 200) {
printMessage("GET APP CONFIG RESPONSE = ${response.body}");
BusinessAppConfigModel? businessAppConfigModel =
BusinessAppConfigModel.fromJson(jsonDecode(response.body)["data"]);
SharedPreference.setBusinessConfig(businessAppConfigModel);
return response;
} else {
printMessage("GET APP CONFIG RESPONSE = ${response.statusCode}");
printMessage("GET APP CONFIG RESPONSE = ${response.body}");
return response;
}
}