contrastColorTrans function
Implementation
Color contrastColorTrans(
Color color, {
double blackOpacity = 0.12,
double whiteOpacity = 0.24,
double threshold = 0.15,
}) {
return isDark(color, threshold: threshold)
? const Color(0xffffffff).withOpacity(whiteOpacity)
: const Color(0xff000000).withOpacity(blackOpacity);
}