feat: ability to observe state directly via context.watch #4330
Labels
enhancement candidate
Candidate for enhancement but additional research is needed
pkg:flutter_bloc
This issue is related to the flutter_bloc package
Milestone
Description
Oftentimes I am bitten by the fact that doing the following is not supported:
Instead, I need to do:
The former is a bit more ergonomic than the latter, and is something you can see done via
StateNotifier
(as mentioned in the README, sorry...no closer anchors).Desired Solution
I haven't looked at bloc's code, so this might be dumb, but I would suspect that another
Provider<T>
could be shimmed in such that BOTH (the cubit and its state) are provided and the consumer can select which they want to observe.Alternatives Considered
Me just dealing with it 💁♂️
Additional Context
You can see the original discussion RE: this issue in Discord.
The text was updated successfully, but these errors were encountered: