Computed<T> class

Inheritance

Constructors

Computed.new({required List<Reactive> dependencies, required T compute()})

Properties

compute → T Function()
final
dependencies List<Reactive>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T
Lấy giá trị hiện tại
getter/setter pairinherited

Methods

dispose() → void
Xoá toàn bộ listener (để tránh rò rỉ bộ nhớ)
override
listen(ReactiveListener listener) → void
Thêm listener để phản hồi khi state thay đổi
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(ReactiveListener listener) → void
Gỡ listener
inherited
reset(T defaultValue) → void
Reset giá trị về mặc định
inherited
toString() String
A string representation of this object.
inherited
updateAsync(Future<T> asyncUpdater(T current)) Future<void>
Cập nhật bất đồng bộ (ví dụ gọi API rồi gán lại giá trị)
inherited
updateSync(T updater(T current)) → void
Cập nhật đồng bộ bằng 1 hàm cập nhật
inherited

Operators

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