Search code examples
flutteruser-interfacebottomappbar

Flutter smoother circular of notched bottomAppBar


bottomBar I've made

I made a bottomAppBar as shown in the above picture.
Here's My code:

ClipRRect(
    borderRadius: const BorderRadius.only(
        topLeft: Radius.circular(35), topRight: Radius.circular(35)),
    child: BottomAppBar(
      elevation: 10,
      shadowColor: Colors.black,
      shape:
      const CircularNotchedRectangle(            
      ),
      notchMargin: 12,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
         //items of bottomAppBar
        ],
      ),
    ),
  ),

However, I want the smoother effect of notched part as shown in the picture below.
How can I achieve this?


bottomBar I want to make


Solution

  • You may need to build a custom BottomAppBar.

    In the link below you can find the solution to your question:

    https://github.com/sardapv/NavBar-CurvedShape-flutter/blob/master/lib/main.dart

    Also for implementing app bars with custom curves the article below is useful:

    https://medium.com/flutter-community/custom-shaped-appbar-as-seen-in-the-bunny-search-app-6312d067485c