materialize method
Apply 🟦 kElevationShadowOpacityRamp to this
as
📊 rampOpacity
parameter stops
.
Optionally
Apply a single new 🎨 color
for each
BoxShadow.color in this
simultaneously.
Implementation
List<BoxShadow> materialize({Color? color}) {
if (length == 0)
return this;
else if (length == 3)
return this.rampOpacity(kElevationShadowOpacityRamp, color: color);
else {
// assert(false, '[materialize] is intended for `List<BoxShadow>` defined by `kElevationToShadow`, which contain 3x `BoxShadow` entries.');
}
// If there are more than three entries in `this`, then
// `kElevationShadowOpacityRamp.last` is applied to any after the third.
return this.rampOpacity(kElevationShadowOpacityRamp, color: color);
}