replaceCustomState method

void replaceCustomState(
  1. Set<S> states
)

replace customState by states and rebuild

Implementation

void replaceCustomState(Set<S> states) {
  customState.clear();
  customState.addAll(states);
  setState(() {});
}