BaseVm class

基于 MVVM 架构的 ViewModel 基类 @author sunlunchang

Inheritance
Implementers

Constructors

BaseVm()

Properties

disposed bool
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
vmSubList List<VmSub>
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
销毁当前 ViewModel 时调用,清理所有注册的 VmSub
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
重写 notifyListeners 方法,只有在未销毁时才通知监听器
inherited
registerVmSub(VmSub? vmSub) → void
注册 VmSub 到当前 ViewModel
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited
unRegisterVmSub(VmSub? vmSub) → void
从当前 ViewModel 中注销 VmSub

Operators

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