green constant

MaterialColor const green

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

// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// ```dart
/// Icon(
///   Icons.widgets,
///   color: Colors.green[400],
/// )
/// ```
///
/// </callout-box>
///
/// 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.
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),
});