setSkin method
Implementation
@override
@protected
void setSkin(ButtonState state) {
var skin = skinsMap[state];
if (state.isDisabledAndSelected && !hasSkinForState(state)) {
skin = skinsMap[ButtonState.disabled];
}
if (state.isDownAndSelected && !hasSkinForState(state)) {
skin = skinsMap[ButtonState.down];
}
if (state.isHoverAndSelected && !hasSkinForState(state)) {
skin = skinsMap[ButtonState.hover];
}
if (state.isDownAndSelected && !hasSkinForState(state)) {
skin = skinsMap[ButtonState.down];
}
skin = skin ?? (isSelected ? defaultSelectedSkin : defaultSkin);
skin?.parent = skinContainer;
}