Skip to content

Commit

Permalink
docs(hydrated_bloc): update README snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Apr 4, 2022
1 parent 3c3994c commit bcd3068
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/hydrated_bloc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ Our top sponsors are shown below! [[Become a Sponsor](https://github.com/sponsor

```dart
void main() async {
final storage = await HydratedStorage.build(storageDirectory: ...);
HydratedBlocOverrides.runZoned(
() => runApp(App()),
storage: storage,
createStorage: async () {
return HydratedStorage.build(storageDirectory: ...);
},
);
}
```
Expand Down Expand Up @@ -163,7 +164,7 @@ class MyHydratedStorage implements Storage {
HydratedBlocOverrides.runZoned(
() => runApp(MyApp()),
storage: MyHydratedStorage(),
createStorage: () => MyHydratedStorage(),
);
```

Expand Down

0 comments on commit bcd3068

Please sign in to comment.