如何在Dart Flutter中制作容器内的曲线?

问题描述 投票:0回答:1

我制作了这个应用程序,其中我必须制作一个像这样的底部导航栏,它在容器内部弯曲,因此是否有任何特定的解决方案,我们将不胜感激。谢谢

我制作了这个应用程序,其中我必须制作一个像这样的底部导航栏,它在容器内部弯曲,因此是否有任何特定的解决方案,我们将不胜感激。谢谢

flutter dart navigationbar
1个回答
0
投票

您可以使用 BottomAppBar 的 shape 属性来实现类似的效果,然后给它 CircularNotchedRectangle 形状来创建这样的曲线:

BottomAppBar(
          notchMargin: 7,
          color: Color(0xff1c1f26),
          shape: CircularNotchedRectangle()

或者只使用像 stylish_bottom_bar

这样的包
© www.soinside.com 2019 - 2024. All rights reserved.