setState method

void setState(
  1. T updater(
    1. T current
    )
)

Implementation

void setState(T Function(T current) updater) {
  push(updater(_state));
}