Skip to content

Commit af4420f

Browse files
authored
Merge pull request nisrulz#11 from Ephenodrom/patch-2
Update main.dart
2 parents 3ea3b36 + 2164983 commit af4420f

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)