ViewModel class abstract

A base class for view models. Can be extended to hold state and dispose resources.

Mixed-in types

Constructors

ViewModel()

Properties

hashCode int
The hash code for this object.
no setterinherited
props List<Prop>
Return all registered props for reactive updates.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Called when the ViewModel is being disposed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onInit() → void
Optional lifecycle method to perform initialization logic.
register<T>(T prop) → T
Automatically register a Prop so it can notify the UI on change.
toString() String
A string representation of this object.
inherited

Operators

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