简体   繁体   中英

How to create a Notched Shape in flutter

在此处输入图像描述

Trying to figure out how to build something similar to the images but with not result. I tried to use CircularNotchedRectangle code and put it inside a CustomPainter but couldn't figure out how to adapt it to my case.

any suggestions will be appreciated!!

You can use Flutter Shape Maker online tool. With the help of this you can create your custom shape and it will give you a code for that shape.

You can have it on the bottomNavitationBar property of the Scaffold and use the BottomAppBar widget with a notchMargin and a shape to put your CircularNotchedRectangle :

Scaffold(
  ...
  bottomNavigationBar: BottomAppBar(
    notchMargin: 6.0,
    shape: CircularNotchedRectangle(),
    child: Row(
      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
      children: <Widget>[
        ...
      ],
    ),
  ),
);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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