Upgrading flutter_bloc 4 to 5
Breaking4.0.1 → 5.0.1Breaking3Changed7Other8
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- If you use BlocBuilder with a condition to control rebuilds, rename that parameter to buildWhen.
- If you use BlocListener with a condition to control when it reacts, rename that parameter to listenWhen.
- This version requires bloc 5.0.0, which has its own breaking changes you may need to handle.
Must act 3 items need code or config changes
What you must change
Breaking3
Renames the
condition parameter on BlocBuilder to buildWhen.BlocBuilderconditionbuildWhenRenames the
condition parameter on BlocListener to listenWhen.BlocListenerconditionlistenWhenUpgrades to bloc v5.0.0, which is a breaking dependency change.
bloc