mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Make the URL for the data JSON file absolute. (#902)
* Make the URL for the data JSON file absolute. * dart format
This commit is contained in:
@@ -42,7 +42,8 @@ class HState extends State<Home> {
|
||||
}
|
||||
|
||||
Future<void> getData() async {
|
||||
http.Response r = await http.get('/data.json');
|
||||
http.Response r = await http.get(
|
||||
'https://flutter.github.io/samples/web/filipino_cuisine/data.json');
|
||||
fd = json.decode(r.body) as Map<String, dynamic>;
|
||||
setState(() => fi = fd['0'] as Map<String, dynamic>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user