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
It is frustrating that I have to split code to multiple parts to get around the fact that I can't just override a bloc provider.
Sometimes in testing, it makes that testing task a nightmare and the code untestable.
I think this is one missing feature that will make the life of a lot of developers including me, you and everybody easier.
Desired Solution
A BlocOverrides/RepositoryOverrides widget that overrides any Bloc/Repository in the tree under it. Something similar to how ProviderScope works.
Alternatives Considered
I tried splitting the providing code to a separate widget and the ui code in a different widget but that does not work for example when testing a bottom sheet opening from another screen since i use the widget that has bloc provider.
The text was updated successfully, but these errors were encountered:
BlocProvider and RepositoryProvider rely on package:provider. This sounds like a feature request for package:provider and I highly recommend moving this issue to the provider GitHub repository. Let me know what you think, thanks!
Description
It is frustrating that I have to split code to multiple parts to get around the fact that I can't just override a bloc provider.
Sometimes in testing, it makes that testing task a nightmare and the code untestable.
I think this is one missing feature that will make the life of a lot of developers including me, you and everybody easier.
Desired Solution
A BlocOverrides/RepositoryOverrides widget that overrides any Bloc/Repository in the tree under it. Something similar to how ProviderScope works.
Alternatives Considered
I tried splitting the providing code to a separate widget and the ui code in a different widget but that does not work for example when testing a bottom sheet opening from another screen since i use the widget that has bloc provider.
The text was updated successfully, but these errors were encountered: