foregroundColorByLuminance function

Color foregroundColorByLuminance(
  1. Color background
)

Implementation

Color foregroundColorByLuminance(Color background) {
  if (background.isDark) {
    return Colors.white;
  } else {
    return Colors.grey.shade900;
  }
}