Commit 85d1704e authored by GayaniPKarunaratne's avatar GayaniPKarunaratne

Display final risk in flutter app2

parent d3200455
......@@ -238,23 +238,23 @@ Future<void> check() async{
String urls = 'https://eanalyzer.herokuapp.com/api/eanalyzer?NoInfected='+noOfInfected.toString()+'&NearToDistrict='+nearToDistrict.toString()+'&NoOfPeople='+noOfPeople.toString();
var Data = await Getdata(urls);
var reText = jsonDecode(Data);
print(reText);
//print(reText);
// var ex = [2];
//-----------------------------------------------------OutPut------------------------------------------------------------------------------
if(reText.toString() == '[0]') {
print("This is a Low Risk area");
//print("This is a Low Risk area");
reText = "Low Risk";
finalRisk = reText;
ima = 101;
}
else if(reText.toString() == '[1]') {
print("This is a Moderate Risk area");
//print("This is a Moderate Risk area");
reText = "Moderate Risk";
finalRisk = reText;
ima = 102;
}
else if(reText.toString() == '[2]') {
print("This is a High Risk area");
//print("This is a High Risk area");
reText = "High Risk";
finalRisk = reText;
ima = 103;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment