EventNotifier class

create_user: zhengzaihong email:1096877329@qq.com create_date: 2024/7/30 create_time: 16:13 describe: 示例:


EventNotifier(局部 target 通知)

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
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

addListener<T>(dynamic target, void listener(T value)) → void
添加监听
clear() → void
清空所有
get<T>(dynamic target) ValueNotifier<T>?
获取已有的 ValueNotifier
listenOnce<T>(dynamic target, void listener(T value)) → void
一次性监听
obtain<T>(dynamic target, {void listener(T value)?, T? defaultValue}) ValueNotifier<T>
获取或创建 ValueNotifier
remove(dynamic target) → void
移除某个 target
removeListener<T>(dynamic target, void listener(T value)) → void
移除监听(不推荐手动,建议使用自动解绑或 Stream)
sendNotification<T>(dynamic target, T? object) → void
发送通知
stream<T>(dynamic target) Stream<T>