core/event/bus library

Package event provides a type-based event subscription system.

This is a port of the Go implementation from go-libp2p/core/event/bus.go to Dart, using native Dart idioms like Stream Controllers instead of Go channels.

Classes

Emitter
Emitter represents an actor that emits events onto the eventbus.
EventBus
Bus is an interface for a type-based event delivery system.
Subscription<T>
Subscription represents a subscription to one or multiple event types.

Properties

WildcardSubscription → _WildcardSubscriptionType
WildcardSubscription is the type to subscribe to receive all events emitted in the eventbus.
final

Typedefs

CancelFunc = dynamic Function()
A function that closes a subscriber.
EmitterOpt = dynamic Function(Object)
A function that represents an emitter option. Use the options exposed by the implementation of choice.
SubscriptionOpt = dynamic Function(Object)
A function that represents a subscription option. Use the options exposed by the implementation of choice.