FConfigValueNotifier class
用于标记字段或 getter 的注解,实现 ValueNotifier 功能。
该注解可用于 getter 或字段,配合代码生成器实现配置变更通知。 使用后,字段或getter会被包装为ValueNotifier,当配置值变化时自动通知监听者。 使用示例:
@FConfigValueNotifier()
String get appName => _appName;
- Implemented types
- Annotations
-
- @Target.new({TargetKind.getter, TargetKind.field})
Constructors
- FConfigValueNotifier()
-
构造函数,常量形式。
const
Properties
- classCode → String
-
生成的类代码片段,声明 ValueNotifier 并初始化。
final
- getFieldCode → String?
-
生成的获取字段代码片段,返回 ValueNotifier。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setFieldCode → String?
-
生成的设置字段代码片段(此处无实现)。
final
- valueUpdateListenerFunCode → String
-
生成的值变更监听方法代码片段,实现 ValueNotifier 的赋值。
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