event_bus library


Contract need listener do something and need callback when job is done


brodcast(dynamic event) → void
brodcast a new event on the event bus with the specified event.
contract(Contract event) Future<bool>
caller open contract, need call back when job done
doneForTest() Future<void>
This is generally only in a testing context.
listen<T>(dynamic func(dynamic)) StreamSubscription
Listens for events of Type T and its subtypes.