Update main.dart

"JSON" changed to "json" as it is written as part 'json.dart'; in the convert.dart file. "JSON" displays an error in the Android Studio IDE.
This commit is contained in:
Ephenodrom
2018-11-13 22:01:02 +01:00
committed by GitHub
parent 3ea3b368da
commit 216498340d

View File

@ -34,7 +34,7 @@ class MyGetHttpDataState extends State<MyGetHttpData> {
// To modify the state of the app, use this method
setState(() {
// Get the JSON data
var dataConvertedToJSON = JSON.decode(response.body);
var dataConvertedToJSON = json.decode(response.body);
// Extract the required part and assign it to the global variable named data
data = dataConvertedToJSON['results'];
});