Event Bus Provider
A flutter provider that passes EventBus
down to all the widgets.
NOTE: This package is an extension to zam_event_bus
.
What's inside the package
Includes the following core components.
Check out all the components in detail here
How to use
Step 1: Create an EventBus
EventBus
is from zam_event_bus
package.
Step 2: Provide the EventBus
Add EventBusProvider
before MaterialApp
so that it is made available to all the routes.
Step 3: Use context to dispatch events
Step 4: Wrap your widget with View widget to listen to data
You can also use StreamBuilder
to listen to data.
Or you can create a widget extending DataWidget
.
To learn more, move on to the example section or check out these dedicated examples in github.