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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user