getButtonTextColor static method

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

Implementation

static Color getButtonTextColor(
  BuildContext context, {
  UpStyle? override,
  UpStyle? style,
  UpColorType? colorType,
}) {
  return style?.isDisabled == true
      ? override?.buttonDisabledTextColor ??
          style?.buttonDisabledTextColor ??
          getStyleByType(
            UpConfig.of(context).theme,
            colorType,
          ).buttonDisabledTextColor ??
          UpConstants.kDefaultStyleDisabledForegroundColor
      : override?.buttonTextColor ??
          style?.buttonTextColor ??
          getStyleByType(
            UpConfig.of(context).theme,
            colorType,
          ).buttonTextColor ??
          Theme.of(context).colorScheme.secondary;
}