onColorFor static method
- Color background
A foreground color that reads well on background.
Implementation
static Color onColorFor(Color background) {
return ThemeData.estimateBrightnessForColor(background) == Brightness.dark
? Colors.white
: Colors.black87;
}