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(context).button.colorBgStrongLoadingMono : theme.colorScheme(context).actionLoading;
case OudsButtonHierarchy.minimal:
return onColoredSurface ? theme.componentsTokens(context).button.colorBgMinimalLoadingMono : theme.componentsTokens(context).button.colorBgMinimalLoading;
case OudsButtonHierarchy.negative:
return theme.colorScheme(context).actionNegativeLoading;
default:
return onColoredSurface ? theme.componentsTokens(context).button.colorBgDefaultLoadingMono : theme.componentsTokens(context).button.colorBgDefaultLoading;
}
}