update method

void update(
  1. T newValue
)

Updates the state value.

Implementation

void update(T newValue) {
  value = newValue;
}