[英]How to draw a rectangle with one side as a half circle in flutter?
This is what I am trying to achieve (excuse the imperfection but you get the idea):这就是我想要实现的目标(请原谅不完美,但你明白了):
I see some tutorials using clipper but they dont seem to achieve what I want, I need to use a container to draw this as I want to place some text over it.我看到一些使用 Clipper 的教程,但它们似乎没有达到我想要的效果,我需要使用容器来绘制它,因为我想在上面放置一些文本。
class DrawCustomCircle extends CustomClipper<Path> {
@override
Path getClip(Size size) {
final Path path = new Path();
...
return path;
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) {
return true;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.