getColor method
Color?
getColor(
- BuildContext context, {
- FastButtonEmphasis? emphasis,
- bool isEnabled = true,
- Color? disabledColor,
- Color? color,
- Widget? icon,
Implementation
Color? getColor(
BuildContext context, {
FastButtonEmphasis? emphasis,
bool isEnabled = true,
Color? disabledColor,
Color? color,
Widget? icon,
}) {
if (!isEnabled) {
return getDisabledColor(
context,
disabledColor: disabledColor,
isEnabled: isEnabled,
emphasis: emphasis,
color: color,
icon: icon,
);
}
if (color != null) return color;
if ((icon is FaIcon) && icon.color != null) return icon.color!;
if ((icon is Icon) && icon.color != null) return icon.color!;
return getEmphasisedColor(context, emphasis: emphasis);
}