updateState method

void updateState(
  1. SwayzeHeaderState stateUpdate(
    1. SwayzeHeaderState previousState
    )
)

Implementation

void updateState(
  SwayzeHeaderState Function(SwayzeHeaderState previousState) stateUpdate,
) {
  value = stateUpdate(value);
}