Skip to content

Commit 2164983

Browse files
authored
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.
1 parent 3ea3b36 commit 2164983

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

using_http_get/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MyGetHttpDataState extends State<MyGetHttpData> {
3434
// To modify the state of the app, use this method
3535
setState(() {
3636
// Get the JSON data
37-
var dataConvertedToJSON = JSON.decode(response.body);
37+
var dataConvertedToJSON = json.decode(response.body);
3838
// Extract the required part and assign it to the global variable named data
3939
data = dataConvertedToJSON['results'];
4040
});

0 commit comments

Comments
 (0)