Shape constructor
const
Shape({
- CornerSpec corners = CornerSpec.ROUNDED,
- CornerSpec? baseCorners,
- BorderSide? border,
- BorderSide? baseBorder,
- BorderRadiusGeometry radius = _RADIUS,
- SurfaceLayer padLayer = SurfaceLayer.CHILD,
- double shapeScaleChild = 1.0,
- double shapeScaleMaterial = 1.0,
- double shapeScaleBase = 1.0,
- 📐 CornerSpec
Shape
description- Use corners to customize all four corners in a Shape and their 🔘 radius.
- Specify baseCorners separately if desired.
const
CornerSpec
s with pre-set configurations available:
- ➖
BorderSide
borders- Add a BorderSide decoration to the edges of this Shape.
- Specify baseBorder separately if desired.
- 🔘
Corner
BorderRadius
radius- Defers to any Shape.corners or Shape.baseCorners supplied 🔘 CornerSpec.radius, if available.
- 🔛
SurfaceLayer
padLayer- Specify a 📚 SurfaceLayer to receive Surface.padding value.
- Default is 📚
SurfaceLayer.CHILD
- 📏
Shape
scaling- See
double
s shapeScaleChild, shapeScaleMaterial, shapeScaleBase
- See
Implementation
const Shape({
this.corners = CornerSpec.ROUNDED,
this.baseCorners,
this.border,
this.baseBorder,
this.radius = _RADIUS,
this.padLayer = SurfaceLayer.CHILD,
this.shapeScaleChild = 1.0,
this.shapeScaleMaterial = 1.0,
this.shapeScaleBase = 1.0,
});