getBorderWidth method
- OudsControlState state,
- bool selected,
- dynamic token
Gets the border width based on the checkbox state.
Implementation
double getBorderWidth(OudsControlState state, bool selected, token) {
switch (state) {
case OudsControlState.enabled:
return selected ? token.borderWidthSelected : token.borderWidthUnselected;
case OudsControlState.disabled:
return selected ? token.borderWidthSelected : token.borderWidthUnselected;
case OudsControlState.hovered:
return selected ? token.borderWidthSelectedHover : token.borderWidthUnselectedHover;
case OudsControlState.pressed:
return selected ? token.borderWidthSelectedPressed : token.borderWidthUnselectedPressed;
case OudsControlState.focused:
return selected ? token.borderWidthSelectedFocus : token.borderWidthUnselectedFocus;
case OudsControlState.readOnly:
return selected ? token.borderWidthSelected : token.borderWidthUnselected;
}
}