doc(bloc_helper): update readme
This commit is contained in:
parent
efda077f4b
commit
61c6e637ec
@ -116,6 +116,19 @@ Widget onBuild(BuildContext context, CounterState state) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If needed, you can wrap what depends on the state with the function `onWrap`.
|
||||||
|
|
||||||
|
```dart
|
||||||
|
@override
|
||||||
|
Widget onWrap(BuildContext context, Widget child) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('Title'),
|
||||||
|
),
|
||||||
|
body: child,
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
> Note: you can override `onBuild`, but also `onListen`, `shouldBuildWhen` and `shouldListenWhen` methods.
|
> Note: you can override `onBuild`, but also `onListen`, `shouldBuildWhen` and `shouldListenWhen` methods.
|
||||||
|
|
||||||
### Both BlocProvider and BlocConsumer
|
### Both BlocProvider and BlocConsumer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user