我正在尝试从Dribble设计中创建一个Flutter底部应用栏,我希望这些曲线能像设计一样平滑,但是浮动操作按钮的缺口不如设计中的那么平滑。我无法想到另一种实现方法。
这是我的Scaffold代码 -
左边的图片是我想要实现的,右边的图片是我已经实现的,请注意第一张图片中的平滑边界。我尝试使用Custom painter和quadraticBezierCurve,但没有成功。
感谢帮助。
这是我的Scaffold代码 -
bottomNavigationBar: ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(40), topRight: Radius.circular(40)),
child: Container(
child: BottomAppBar(
shape: CircularNotchedRectangle(),
color: Colors.blue,
child: SizedBox(
height: height * 0.12,
width: width,
),
),
),
),
floatingActionButton: Container(
margin: EdgeInsets.all(8),
width: 80.0,
height: 80.0,
child: FloatingActionButton(
onPressed: () {},
child: Icon(
Icons.add,
size: 25.0,
),
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
左边的图片是我想要实现的,右边的图片是我已经实现的,请注意第一张图片中的平滑边界。我尝试使用Custom painter和quadraticBezierCurve,但没有成功。
![enter image description here](https://istack.dev59.com/Ix8Hc.webp)