Unverified Commit d518bd2d authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Pass shadowColor param to SceneBuilder (#15714)

* pass shadowColor param to SceneBuilder

* add doc comment and diagnostic node for shadowColor

* Add missing shadowColor param
parent ad9506d2
......@@ -764,9 +764,11 @@ class PhysicalModelLayer extends ContainerLayer {
@required this.clipPath,
@required this.elevation,
@required this.color,
@required this.shadowColor,
}) : assert(clipPath != null),
assert(elevation != null),
assert(color != null);
assert(color != null),
assert(shadowColor != null);
/// The path to clip in the parent's coordinate system.
///
......@@ -786,6 +788,9 @@ class PhysicalModelLayer extends ContainerLayer {
/// (as described at [Layer]).
Color color;
/// The shadow color.
Color shadowColor;
@override
void addToScene(ui.SceneBuilder builder, Offset layerOffset) {
if (!debugDisablePhysicalShapeLayers)
......@@ -793,6 +798,7 @@ class PhysicalModelLayer extends ContainerLayer {
path: clipPath.shift(layerOffset),
elevation: elevation,
color: color,
shadowColor: shadowColor,
);
addChildrenToScene(builder, layerOffset);
if (!debugDisablePhysicalShapeLayers)
......
......@@ -1495,6 +1495,7 @@ abstract class _RenderPhysicalModelBase<T> extends _RenderCustomClip<T> {
super.debugFillProperties(description);
description.add(new DoubleProperty('elevation', elevation));
description.add(new DiagnosticsProperty<Color>('color', color));
description.add(new DiagnosticsProperty<Color>('shadowColor', color));
}
}
......@@ -1596,6 +1597,7 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
clipPath: offsetClipPath,
elevation: elevation,
color: color,
shadowColor: shadowColor,
);
context.pushLayer(physicalModel, super.paint, offset, childPaintBounds: offsetBounds);
} else {
......@@ -1702,6 +1704,7 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase<Path> {
clipPath: offsetPath,
elevation: elevation,
color: color,
shadowColor: shadowColor,
);
context.pushLayer(physicalModel, super.paint, offset, childPaintBounds: offsetBounds);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment