setCustomState method

void setCustomState(
  1. S _state,
  2. bool isSet
)

add or set move _state from customState and rebuild

Implementation

void setCustomState(S _state, bool isSet) {
  return isSet ? addCustomState(_state) : removeCustomState(_state);
}