StreamCubit<T> constructor

StreamCubit<T>(
  1. T initialValue,
  2. Stream<T> stream
)

Implementation

StreamCubit(T initialValue, Stream<T> stream) : super(initialValue) {
  _sub = stream.listen((event) => emit(event));
}