ValueChanged<T> class

Represents a change in a single observable value.

This event is typically dispatched when a reactive value updates from an old value to a new value. It holds both values so that you can compare or react accordingly.

Example

void main() {
  // Suppose you are observing a value
  var oldValue = 10;
  var newValue = 20;

  var event = ValueChanged<int>(oldValue, newValue);

  print(event.oldValue); // 10
  print(event.newValue); // 20
}
Inheritance
Annotations

Constructors

ValueChanged(T? oldValue, T? newValue)
Represents a change in a single observable value.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
newValue → T?
The new value after the change occurred.
final
oldValue → T?
The previous value before the change occurred.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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