GlobalBroadcastEventInterface<T> class abstract

GlobalBroadcastEventInterface 全局广播事件接口 全局广播、应用生命周期内有效

使用示例

创建事件、默认使用类名作为事件名,因此应避免出现重名类 也可以 override name 自定义事件名

class GBOnRouteChanged extends GlobalBroadcastEventInterface

创建监听 Broadcast.addEventListener

发送事件 GBOnRouteChanged(data: 'index').emit();

Implementers

Constructors

GlobalBroadcastEventInterface({T? data})

Properties

data ↔ T?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
name String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

emit() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited