You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there's a bug in _BlocBuilderBaseState. If I initialize a BlocBuilder with a condition, previousState defaults to null even if the provided bloc has an existing state...so the listener built in _subscribe() necessarily throws a null error on the bloc's next state change (assuming you're using an operator on previousState).
I think this can be fixed by setting _previousState = widget.bloc.currentState in the initState() method...ie. same assignment as state.
The text was updated successfully, but these errors were encountered:
First off, thanks for including the condition :)
I think there's a bug in _BlocBuilderBaseState. If I initialize a BlocBuilder with a condition, previousState defaults to null even if the provided bloc has an existing state...so the listener built in _subscribe() necessarily throws a null error on the bloc's next state change (assuming you're using an operator on previousState).
I think this can be fixed by setting _previousState = widget.bloc.currentState in the initState() method...ie. same assignment as state.
The text was updated successfully, but these errors were encountered: