Pass shadowColor param to SceneBuilder (#15714)
* pass shadowColor param to SceneBuilder * add doc comment and diagnostic node for shadowColor * Add missing shadowColor param
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user