mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-09-20 23:36:36 +08:00
@ -34,7 +34,7 @@ class MyGetHttpDataState extends State<MyGetHttpData> {
|
|||||||
// To modify the state of the app, use this method
|
// To modify the state of the app, use this method
|
||||||
setState(() {
|
setState(() {
|
||||||
// Get the JSON data
|
// 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
|
// Extract the required part and assign it to the global variable named data
|
||||||
data = dataConvertedToJSON['results'];
|
data = dataConvertedToJSON['results'];
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user