Future<int> getSettings(int i) async {
final url = Uri.parse(ApiLinks.settingsUrl + "/settings");
try {
http.Response response = await http.get(url,
headers: {
'Authorization': ApiLinks.token
});
if (response.statusCode == 200) {
var res = jsonDecode(response.body);
//print(" res = "+res.toString());
print(" res0 = "+res["StatusMessage"][i]["value_setting"].toString());
return res["StatusMessage"][i]["value_setting"];
}
return 0;
} catch (e) {
print("Settings Api Get, error occurred " + e.toString());
return 0;
}
}