Upgrading event_bus 0.4 to 1
Breaking0.4.1 → 1.1.1Breaking3New1Fixed1Other2
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- Remove new keyword.
- BREAKING CHANGE: The on method now has a generic type.
- BREAKING CHANGE: Every EventBus is now hierarchical so that listeners will also receive events of subtypes of the specified type.
Must act 3 items need code or config changes
Requires Dart SDK >=2.0.0 <3.0.0 from 1.0.2 (none stated before).
What you must change
Breaking3
Remove new keyword.
newBREAKING CHANGE: The on method now has a generic type.
onmyEventBus.on(MyEventType)myEventBus.on<MyEventType>()BREAKING CHANGE: Every EventBus is now hierarchical so that listeners will also receive events of subtypes of the specified type.
EventBusHierarchicalEventBus