getBackgroundColor static method
Color
getBackgroundColor(
- BuildContext context, {
- UpStyle? override,
- UpStyle? style,
- UpColorType? colorType,
Implementation
static Color getBackgroundColor(
BuildContext context, {
UpStyle? override,
UpStyle? style,
UpColorType? colorType,
}) {
return style?.isDisabled == true
? override?.disabledBackgroundColor ??
style?.disabledBackgroundColor ??
getStyleByType(
(FlutterUpConfig.of(context)?.theme ?? UpConstants.kDefaultTheme),
colorType,
).disabledBackgroundColor ??
UpConstants.kDefaultStyleDisabledBackgroundColor
: override?.backgroundColor ??
style?.backgroundColor ??
getStyleByType(
(FlutterUpConfig.of(context)?.theme ??
UpConstants.kDefaultTheme),
colorType)
.backgroundColor ??
Theme.of(context).primaryColor;
}