getClip method

  1. @override
Path getClip(
  1. Size size
)
override

Returns a description of the clip given that the render object being clipped is of the given size.

Implementation

@override
Path getClip(Size size) {
  final w = size.width;
  final h = size.height;
  return Path()
    ..moveTo(w * 0.5, 0)
    ..lineTo(w, h * 0.25)
    ..lineTo(w, h * 0.75)
    ..lineTo(w * 0.5, h)
    ..lineTo(0, h * 0.75)
    ..lineTo(0, h * 0.25)
    ..close();
}