updateCustomState method

ValueChanged<bool> updateCustomState(
  1. S _state, {
  2. ValueChanged<bool>? onChanged,
})

update _state function

Implementation

ValueChanged<bool> updateCustomState(S _state,
    {ValueChanged<bool>? onChanged}) {
  return (bool value) {
    if (customState.contains(_state)) {
      return;
    }
    setCustomState(_state, value);
    onChanged?.call(value);
  };
}