Hi
in my case I have 2 different Blocs and I want to combine them together like :
Rx.combineLatest2(positionBloc.state, disableBloc.state, (a, b) => null)
and says:
The argument type 'PositionState' can't be assigned to the parameter type 'Stream<dynamic>'
The argument type 'DisableState' can't be assigned to the parameter type 'Stream<dynamic>'
so what can I do here for combining ?
also is it possible to add CombineBlocs to existing widget in this awesome library ?
Thanks.
Hi @mohammadne 馃憢
The bloc itself is a Stream<State> so you should be combining the blocs and not their state.
Rx.combineLatest2(positionBloc, disableBloc, (a, b) => null)
Alternatively you could inject some bloc into some other bloc as showcased here.
Thanks @RollyPeres for taking the time to answer! 馃檹
@mohammadne closing this for now but feel free to comment with additional questions and I'm happy to continue the conversation 馃憤
Most helpful comment
Hi @mohammadne 馃憢
The bloc itself is a
Stream<State>so you should be combining the blocs and not their state.Rx.combineLatest2(positionBloc, disableBloc, (a, b) => null)Alternatively you could inject some bloc into some other bloc as showcased here.