简体   繁体   English

如何在 flutter 中创建自定义形状小部件

[英]How to create custom shape widgets in flutter

I have to design a menu screen in flutter as shown below, and I don't know how to create menu items with custom shapes.我必须在 flutter 中设计一个菜单屏幕,如下所示,我不知道如何创建具有自定义形状的菜单项。

  1. Food has circular icon.食物有圆形图标。
  2. Beverages has rounded corner box.饮料盒有圆角。
  3. Desserts have rounded corner triangle slightly transformed.甜点的圆角三角形略有变形。
  4. Promotions have rounded corner box.促销有圆角框。

在此处输入图像描述

This might help you or you can use CustomPainter, RotatedBox (use container and rotate with rotated Box or Transform) with Stack可能对您有帮助,或者您可以将 CustomPainter、RotatedBox(使用容器并使用旋转的 Box 或 Transform 旋转)与 Stack 一起使用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM