update abstract method

void update(
  1. T newState
)

Updates the current state to newState and notifies listeners.

Implementation

void update(T newState);