EventBusUtil class
- 功能:创建eventBus工具类
EventBusUtil.singleton.send('aaa');
Constructors
- EventBusUtil()
-
工厂构造函数
factory
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
off(
dynamic eventName, [EventCallback? f]) → void - 移除订阅者
-
on(
dynamic eventName, EventCallback? f) → void - 添加订阅者
-
send(
dynamic eventName, [dynamic arg]) → void - 触发事件,事件触发后该事件所有订阅者会被调用
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- singleton ↔ EventBusUtil
-
保存单例
getter/setter pair