green constant

MaterialColor const green = const MaterialColor(_greenPrimaryValue, const <int, Color> {50 : const Color(0xFFE8F5E9), 100 : const Color(0xFFC8E6C9), 200 : const Color(0xFFA5D6A7), 300 : const Color(0xFF81C784), 400 : const Color(0xFF66BB6A), 500 : const Color(_greenPrimaryValue), 600 : const Color(0xFF43A047), 700 : const Color(0xFF388E3C), 800 : const Color(0xFF2E7D32), 900 : const Color(0xFF1B5E20)})

The green primary color and swatch.

Icon(
  Icons.widgets,
  color: Colors.green[400],
)

See also:

  • greenAccent, the corresponding accent colors.
  • teal, lightGreen, and lime, similar colors.
  • Theme.of, which allows you to select colors from the current theme rather than hard-coding colors in your build methods.

Implementation

static const MaterialColor green = MaterialColor(
  _greenPrimaryValue,
  <int, Color>{
     50: Color(0xFFE8F5E9),
    100: Color(0xFFC8E6C9),
    200: Color(0xFFA5D6A7),
    300: Color(0xFF81C784),
    400: Color(0xFF66BB6A),
    500: Color(_greenPrimaryValue),
    600: Color(0xFF43A047),
    700: Color(0xFF388E3C),
    800: Color(0xFF2E7D32),
    900: Color(0xFF1B5E20),
  },
)