ActiveModel<T> class

An ActiveModel can take the nature of any any object type. When an update is done an ActiveStateChanged event is triggered which in-turn makes a UI rebuild of that widget. UseCases

Using set:

//initialize the property value to zero.
final age = createProperty<int>(0);

//update the property value to five.
age.set(5);

Calling the property:

//initialize the property value to zero.
final age = createProperty<int>(0);

//update the property value to five.
age(5);
Implemented types

Constructors

ActiveModel(T _value, {String? typeName})

Properties

activeController ActiveController
Returns the instance of the ActiveController this property is associated with.
no setter
hashCode int
The hash code for this object.
no setteroverride
isNotNull bool
Returns true if the value of this is not null.
no setter
isNull bool
Returns true if the value of this is null.
no setter
originalValue → T
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeName String?
getter/setter pair
value → T
no setteroverride

Methods

call(T value, {bool notifyChange = true, bool setAsOriginal = false}) → void
Updates the underlying value for this ActiveModel.
equals(dynamic other) bool
Checks if other is equal to the value of this ActiveModel
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset({bool notifyChange = true}) → void
Resets the value to the originalValue.
set(T value, {bool notifyChange = true, bool setAsOriginal = false}) → T
Updates the property value. Notifies any listeners to the change
setActiveController(ActiveController activeController) → void
Links this ActiveModel instance with an ActiveController.
setOriginalValueToCurrent() → void
Updates the original value to what the current value of this property is.
toString() String
A string representation of this object.
override

Operators

operator ==(dynamic other) bool
The equality operator.
override