getBackgroundToken static method
Implementation
static Color getBackgroundToken(BuildContext context, OudsButtonHierarchy hierarchy) {
final theme = OudsTheme.of(context);
final onColoredSurface = OudsTheme.isOnColoredSurfaceOf(context);
switch (hierarchy) {
case OudsButtonHierarchy.strong:
return onColoredSurface ? theme.componentsTokens.button.colorBgStrongLoadingMono : theme.colorsScheme.actionLoading;
case OudsButtonHierarchy.minimal:
return onColoredSurface ? theme.componentsTokens.button.colorBgMinimalLoadingMono : theme.componentsTokens.button.colorBgMinimalLoading;
case OudsButtonHierarchy.negative:
return theme.colorsScheme.actionNegativeLoading;
default:
return onColoredSurface ? theme.componentsTokens.button.colorBgDefaultLoadingMono : theme.componentsTokens.button.colorBgDefaultLoading;
}
}