Skip to content

Commit

Permalink
Merge pull request rrousselGit#92 from tbm98/fix-docs
Browse files Browse the repository at this point in the history
update example context.read
  • Loading branch information
rrousselGit authored Aug 18, 2020
2 parents 9e975b2 + fe8a7ca commit b0cdddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/concepts/reading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Using it, we could refactor our previous code to:
@override
Widget build(BuildContext context) {
return RaisedButton(
onPressed: () => counterProvider.read(context).state++,
onPressed: () => context.read(counterProvider).state++,
child: Text('increment'),
);
}
Expand Down

0 comments on commit b0cdddb

Please sign in to comment.