color property Null safety
final
The color to paint the material.
Must be opaque. To create a transparent piece of material, use MaterialType.transparency.
If ThemeData.useMaterial3 is true then an optional surfaceTintColor overlay may be applied on top of this color to indicate elevation.
If ThemeData.useMaterial3 is false and ThemeData.applyElevationOverlayColor is true and ThemeData.brightness is Brightness.dark then a semi-transparent overlay color will be composited on top of this color to indicate the elevation. This is no longer needed for Material Design 3, which uses surfaceTintColor.
By default, the color is derived from the type of material.
Implementation
final Color? color;