Commit 85d1704e authored by GayaniPKarunaratne's avatar GayaniPKarunaratne

Display final risk in flutter app2

parent d3200455
...@@ -238,23 +238,23 @@ Future<void> check() async{ ...@@ -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(); String urls = 'https://eanalyzer.herokuapp.com/api/eanalyzer?NoInfected='+noOfInfected.toString()+'&NearToDistrict='+nearToDistrict.toString()+'&NoOfPeople='+noOfPeople.toString();
var Data = await Getdata(urls); var Data = await Getdata(urls);
var reText = jsonDecode(Data); var reText = jsonDecode(Data);
print(reText); //print(reText);
// var ex = [2]; // var ex = [2];
//-----------------------------------------------------OutPut------------------------------------------------------------------------------ //-----------------------------------------------------OutPut------------------------------------------------------------------------------
if(reText.toString() == '[0]') { if(reText.toString() == '[0]') {
print("This is a Low Risk area"); //print("This is a Low Risk area");
reText = "Low Risk"; reText = "Low Risk";
finalRisk = reText; finalRisk = reText;
ima = 101; ima = 101;
} }
else if(reText.toString() == '[1]') { else if(reText.toString() == '[1]') {
print("This is a Moderate Risk area"); //print("This is a Moderate Risk area");
reText = "Moderate Risk"; reText = "Moderate Risk";
finalRisk = reText; finalRisk = reText;
ima = 102; ima = 102;
} }
else if(reText.toString() == '[2]') { else if(reText.toString() == '[2]') {
print("This is a High Risk area"); //print("This is a High Risk area");
reText = "High Risk"; reText = "High Risk";
finalRisk = reText; finalRisk = reText;
ima = 103; 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