mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-09-20 14:56:48 +08:00
@ -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'];
|
||||
});
|
||||
|
Reference in New Issue
Block a user