states != null with be apply this state, else with be apply with setCustomState function in key
final Set<S>? states;