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).buttonMono.colorBgStrongLoading : theme.colorScheme(context).actionLoading;
case OudsButtonHierarchy.brand:
return theme.colorScheme(context).actionLoading;
case OudsButtonHierarchy.minimal:
return null;
case OudsButtonHierarchy.negative:
return theme.colorScheme(context).actionNegativeLoading;
default:
return onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBgDefaultLoading : theme.componentsTokens(context).button.colorBgDefaultLoading;
}
}