color property

Color? color
final

When using elevation to style this 📜 Curtains, a color may be provided to stylize the Material elevation-like shadows.

Ignored when constructing standard or instant 📜 Curtains.

Left null, default is three different Colors for three different BoxShadows, as seen in kElevationToShadow:

const Color _kKeyUmbraOpacity = Color(0x33000000); // opacity = 0.2
const Color _kKeyPenumbraOpacity = Color(0x24000000); // opacity = 0.14
const Color _kAmbientShadowOpacity = Color(0x1F000000); // opacity = 0.12
  • Providing a color will maintain these opacities in the resultant List<BoxShadow>.
    • Consider 👥 package:shadows's BoxShadowsUtils
      List<BoxShadow>.rampOpacity to modify opacity.

Implementation

final Color? color;