1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Fix generic type placement of Provider.of call (#661)

This commit is contained in:
Robert Piosik
2021-01-19 21:44:43 +01:00
committed by GitHub
parent f96272db20
commit f3de46714b

View File

@@ -77,7 +77,7 @@ class MyHomePage extends StatelessWidget {
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
onPressed: () { onPressed: () {
// You can access your providers anywhere you have access // You can access your providers anywhere you have access
// to the context. One way is to use Provider<Counter>.of(context). // to the context. One way is to use Provider.of<Counter>(context).
// //
// The provider package also defines extension methods on context // The provider package also defines extension methods on context
// itself. You can call context.watch<Counter>() in a build method // itself. You can call context.watch<Counter>() in a build method