EventBusMixin mixin
事件总线,用于在 widgets 和 viewmodel 之间传递事件 事件可以是任何类型,包括自定义的事件
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
emitEvent(
dynamic event) → void - 通过事件总线发送事件
-
eventBusStream<
T> () → Stream< T> - 事件总线的事件流
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onEventBus<
T> (void onData(T event)) → StreamSubscription< T> -
监听事件 返回的 StreamSubscription 需要调用
dispose
进行清理。 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited