getBorderColor static method
Implementation
static BorderSide getBorderColor(BuildContext context, OudsButtonHierarchy hierarchy) {
final theme = OudsTheme.of(context);
final onColoredSurface = OudsTheme.isOnColoredSurfaceOf(context);
switch (hierarchy) {
case OudsButtonHierarchy.strong:
return onColoredSurface
? BorderSide(
color: theme.componentsTokens.button.colorBorderStrongLoadingMono, width: theme.componentsTokens.button.borderWidthDefaultInteraction)
: BorderSide.none;
case OudsButtonHierarchy.minimal:
return onColoredSurface
? BorderSide(
color: theme.componentsTokens.button.colorBorderMinimalLoadingMono,
width: theme.componentsTokens.button.borderWidthMinimalInteraction)
: BorderSide(
color: theme.componentsTokens.button.colorBorderMinimalLoading, width: theme.componentsTokens.button.borderWidthMinimalInteraction);
case OudsButtonHierarchy.negative:
return BorderSide.none;
default:
return onColoredSurface
? BorderSide(
color: theme.componentsTokens.button.colorBorderDefaultLoadingMono,
width: theme.componentsTokens.button.borderWidthDefaultInteraction)
: BorderSide(
color: theme.componentsTokens.button.colorBorderDefaultLoading, width: theme.componentsTokens.button.borderWidthDefaultInteraction);
}
}