From 216498340df46a2fbd747d6dab843d8fdb78187b Mon Sep 17 00:00:00 2001 From: Ephenodrom <30625794+Ephenodrom@users.noreply.github.com> Date: Tue, 13 Nov 2018 22:01:02 +0100 Subject: [PATCH] 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. --- using_http_get/lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/using_http_get/lib/main.dart b/using_http_get/lib/main.dart index 55711da..eaacee1 100644 --- a/using_http_get/lib/main.dart +++ b/using_http_get/lib/main.dart @@ -34,7 +34,7 @@ class MyGetHttpDataState extends State { // 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']; });