import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class BackGroundClipper extends CustomClipper { @override Path getClip(Size size) { //创建 Path Path path = Path(); //移动到点 P0点 也是曲线的起点 path.lineTo(0, 0); path.lineTo(size.width, 0); path.lineTo(size.width, size.height - 30.h); path.quadraticBezierTo(size.width / 2.0, size.height, 0, size.height - 30.h); path.close(); return path; } @override bool shouldReclip(CustomClipper oldClipper) { return true; } }