addEventBus method
Add an EventBus
to your Nylo project.
Implementation
addEventBus({int maxHistoryLength = 10, bool allowLogging = false}) {
EventBus eventBus = EventBus(
maxHistoryLength: maxHistoryLength,
allowLogging: allowLogging,
);
const event = UpdateState();
eventBus.watch(event);
Backpack.instance.save("event_bus", eventBus);
}