GetStateExtension<A, S> extension
Get current state synchronously.
This is useful for filling initialData
when using StreamBuilder
in Flutter.
Example:
StreamBuilder<LoginState>(
initialData: store.state,
stream: store.stateStream,
builder: (context, snapshot) {
final state = snapshot.data;
return LoginWidget(state); // build widget based on state.
},
);
- on
-
- RxReduxStore<
A, S>
- RxReduxStore<
Properties
- state → S
-
Get current state synchronously.
This is useful for filling
initialData
when usingStreamBuilder
in Flutter.no setter