resolve method
Resolve the value associated to the given state
.
Implementation
T resolve(TapState state) {
final inactive = this.inactive;
final pressed = this.pressed ?? this.hover ?? inactive;
final disabled = this.disabled ?? inactive;
final hover = this.hover ?? pressed;
return switch (state) {
TapState.inactive => inactive(),
TapState.pressed => pressed(),
TapState.hover => hover(),
TapState.disabled => disabled(),
};
}