I have an issue while writing my code in the main page of my app i'm requesting a get from my json file and receiving a list of users + their info and when tapped on each of these users a new page opens up with some additional information. in the 2nd page i make a new get request and this is where the problem happens and I get this error: The following NoSuchMethodError was thrown building FutureBuilder(dirty, state: _FutureBuilderState get http and my widget.data. returns as null some help would be appreciated.
try {
String url =
'http://10.0.0.21:8000/api/users/' + widget.employee.id.toString();
individualData = await http.get(Uri.parse(url));
var test = individualData;
} catch (e) {
print(e.toString());
}