shape static method
- Key? key,
- required ShapeBorder shape,
- Clip clipBehavior = Clip.antiAlias,
- Widget? child,
Creates a shape clip.
Uses a ShapeBorderClipper to configure the ClipPath to clip to the given ShapeBorder.
Implementation
static Widget shape({
Key? key,
required ShapeBorder shape,
Clip clipBehavior = Clip.antiAlias,
Widget? child,
}) {
return Builder(
key: key,
builder: (BuildContext context) {
return ClipPath(
clipper: ShapeBorderClipper(
shape: shape,
textDirection: Directionality.maybeOf(context),
),
clipBehavior: clipBehavior,
child: child,
);
},
);
}