TrackedState<T> constructor

TrackedState<T>(
  1. T initialValue, {
  2. String? tag,
  3. String? description,
})

Implementation

TrackedState(
  T initialValue, {
  String? tag,
  this.description,
})  : _value = initialValue,
      tag = tag ?? 'TrackedState#${_nextId++}',
      lastUpdated = DateTime.now() {
  StateChangeTracker.registerStateChange(
    tag: this.tag,
    lastUpdated: lastUpdated,
    updateCount: updateCount,
    description: description,
  );
}