Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 08_inherited_widgets/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class _NamePageState extends State<NamePage> {
// Fetch a name asynchonously over HTTP
_get() async {
var res = await http.get('https://jsonplaceholder.typicode.com/users');
var name = JSON.decode(res.body)[0]['name'];
var name = json.decode(res.body)[0]['name'];
setState(() => this.name = name);
}

Expand Down
3 changes: 2 additions & 1 deletion 08_inherited_widgets/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.0

http: ^0.11.3

dev_dependencies:
flutter_test:
sdk: flutter
Expand Down