The CustomPaint widget will do the trick. With it, it's possible to paint custom shapes in the background like the one you asked for. It's just a matter of using the Stack widget to paint the background first and then the other widgets above it.
As lepsch commented, CustomPaint is the way to go, but it you find it complicated or time-consuming, you can also get some help from tools such as FlutterShapeMaker (FlutterShapeMaker), which allows you to draw your shapes as if you were in some design software and export them into a CustomPainter class
First you edit your shape as you like
Then you export it and the tool generates the required class and imports
发布评论
评论(2)
自定义窗口小部件将可以解决问题。有了它,可以像您要的那样在背景中绘制自定义形状。这只是使用 stack widget 然后上方的其他小部件。
这是登录屏幕的原型:
The CustomPaint widget will do the trick. With it, it's possible to paint custom shapes in the background like the one you asked for. It's just a matter of using the Stack widget to paint the background first and then the other widgets above it.
This is a prototype of the login screen:
正如Lepsch评论的那样,CustomPaint是必经之路,但是您发现它很复杂或耗时,您还可以从诸如
fluttershapemaker
之类的工具中获得一些帮助( fluttershapemaker ),它使您可以像在某些设计软件中一样绘制形状,然后将它们导出到ustompainter
首先,按照自己的意愿编辑形状

然后您导出它,该工具生成所需的类和导入

As lepsch commented, CustomPaint is the way to go, but it you find it complicated or time-consuming, you can also get some help from tools such as
FlutterShapeMaker
(FlutterShapeMaker), which allows you to draw your shapes as if you were in some design software and export them into aCustomPainter
classFirst you edit your shape as you like

Then you export it and the tool generates the required class and imports
