📜  自定义形状路径中的颤动图像 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:23.530000             🧑  作者: Mango

代码示例2
class _CustomClipper extends CustomClipper {
  @override
  Path getClip(Size size) {
    final double heightDelta = size.height / 2.2;

    return Path()
      ..addRect(
          Rect.fromLTWH(0, heightDelta, size.width, size.height - heightDelta))
      ..moveTo(0, heightDelta)
      ..quadraticBezierTo(
        size.width / 2,
        heightDelta - size.width / 2,
        size.width,
        heightDelta,
      );
  }

  @override
  bool shouldReclip(CustomClipper oldClipper) => true;
}