StateBloc<T> constructor
StateBloc<T> ([
- T? initialValue
Implementation
StateBloc([T? initialValue]) {
_stateStream = StateBlocStream<T>._(
factory: _streamFactory,
);
_nonNullStream = _stateStream.whereType<T>();
_stateChangeStream = StateBlocChangeStream<T>._(
factory: _streamFactory,
);
if (initialValue != null) {
add(initialValue);
}
}