Skip to content

Commit 56f3d51

Browse files
committed
update example/readme
1 parent 494dbd6 commit 56f3d51

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
A wrapper over [InheritedModel](https://api.flutter.dev/flutter/widgets/InheritedModel-class.html),
66
this module allows users to easily share global state between multiple widgets.
77

8-
It's a no-boilerplate generalization of the `Provider` state management solution.
8+
It's a low-boilerplate generalization of the `Provider` state management solution.
99

1010
## Usage
1111

example/lib/main.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class _MyHomePageState extends State<MyHomePage> {
4141
Widget build(BuildContext context) {
4242
// The .of(context) bit makes this widget rebuild everytime counter is changed
4343
int counterValue = counter.of(context);
44+
counter.value = counterValue;
4445

4546
return Scaffold(
4647
appBar: AppBar(
@@ -72,7 +73,8 @@ class _MyHomePageState extends State<MyHomePage> {
7273
void initState() {
7374
super.initState();
7475

75-
counter.load(); // load previous value from shared prefs
76+
// load previous value from shared prefs
77+
counter.load();
7678
}
7779

7880
Future<void> _incrementCounter() async {

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ packages:
127127
path: ".."
128128
relative: true
129129
source: path
130-
version: "0.2.0"
130+
version: "0.3.0"
131131
sky_engine:
132132
dependency: transitive
133133
description: flutter

0 commit comments

Comments
 (0)