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