flutter - 自定义 ClipPath 帮助 Flutter
问题描述
请帮我建立以下形状。
我编写了以下代码。
class CustomShapeBar extends CustomClipper<Path> {
@override
Path getClip(Size size) {
var path = Path();
double height = size.height;
double width = size.width;
path.lineTo(0, height - 230);
path.quadraticBezierTo(width / 2, height, width, height - 230);
path.lineTo(width, 0);
path.close();
return path;
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) {
return true;
}
}
这就是我所取得的成就:
解决方案
推荐阅读
- python - 将python脚本的参数作为参数传递给它的函数
- python - 检查输入时出错:预期 embedding_1_input 的形状为 (50,) 但数组的形状为 (1,)
- java - 无法转换 getSingleResult() 的结果
- android - 带有 GPS 信息的 Android 10 ACTION_GET_CONTENT 图像?
- excel - 导出为 PDF 宏缺少形状
- python - Pandas 减慢元组的 multiIndex 分配
- django - 运行 Django 服务器的 docker 命令是什么?
- mongodb - 如何将对象值移动到 MongoDB 中的数组?
- r - 满足条件的矩阵索引
- django - 通过 URL 使用多个选项预填充 ManyToManyField?