-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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.
felangelfelangel
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working