getBackgroundColor static method

Color getBackgroundColor(
  1. BuildContext context, {
  2. UpStyle? override,
  3. UpStyle? style,
  4. UpColorType? colorType,
})

Implementation

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