FConfigValueUpdateListener class

用于添加配置值变更监听器的注解。

该注解用于方法上,配合代码生成器实现配置值变更监听功能。 使用示例:

@FConfigValueUpdateListener(keyNames: ['appName', 'version'])
void addConfigListener(FConfigValueListener listener);  // 方法体将被代码生成器替换
Implemented types

Constructors

FConfigValueUpdateListener({List<String>? keyNames})
构造函数。
const

Properties

classCode String?
生成的类代码片段,创建FConfigValueListenerManager实例。
final
funCode String
生成的方法体代码片段,添加监听器。
final
hashCode int
The hash code for this object.
no setterinherited
isAsync bool
是否为异步方法,这里为 false。
final
keyNames List<String>?
要监听的配置键名列表。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
valueUpdateListenerFunCode String
生成的值变更监听方法代码片段,通知监听器。
final

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