# ValueChanged<T> constructor

const ValueChanged<T>(

1. T? oldValue,
2. T? newValue

)

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
    }

## Implementation

    const ValueChanged(this.oldValue, this.newValue);