getHighlightColor method
Color?
getHighlightColor(
- BuildContext context, {
- FastButtonEmphasis? emphasis,
- Color? highlightColor,
- Color? color,
- Widget? icon,
Implementation
Color? getHighlightColor(
BuildContext context, {
FastButtonEmphasis? emphasis,
Color? highlightColor,
Color? color,
Widget? icon,
}) {
if (highlightColor != null) return highlightColor;
if (color != null) {
return color.withAlpha(kFastButtonHighlightAlpha);
}
if ((icon is FaIcon) && icon.color != null) {
return icon.color!.withAlpha(kFastButtonHighlightAlpha);
}
if ((icon is Icon) && icon.color != null) {
return icon.color!.withAlpha(kFastButtonHighlightAlpha);
}
return getEmphasisedColor(context, emphasis: emphasis)
?.withAlpha(kFastButtonHighlightAlpha);
}