skip to Main Content

How to make a custom navbar with a curve like this? What i’m trying to make a navbar with a curve like this, when that particular navbar item is selected. I have used a container now, how can i achieve this curve may be with a smooth animation??! Which will be the better way to create this?!

image for question

2

Answers


  1. enter image description here

    You can achieve your result using the convex_bottom_bar package.

    import 'package:convex_bottom_bar/convex_bottom_bar.dart';
    
    Scaffold(
      bottomNavigationBar: ConvexAppBar(
        items: [
          TabItem(icon: Icons.home, title: 'Home'),
          TabItem(icon: Icons.map, title: 'Discovery'),
          TabItem(icon: Icons.add, title: 'Add'),
          TabItem(icon: Icons.message, title: 'Message'),
          TabItem(icon: Icons.people, title: 'Profile'),
        ],
        onTap: (int i) => print('click index=$i'),
      )
    );
    
    Login or Signup to reply.
  2. enter image description here

    You can use this package:
    curved_navigation_bar 1.0.6

    dependencies:
      curved_navigation_bar: ^1.0.6 #latest version
    
    Scaffold(
      bottomNavigationBar: CurvedNavigationBar(
        backgroundColor: Colors.blueAccent,
        items: <Widget>[
          Icon(Icons.add, size: 30),
          Icon(Icons.list, size: 30),
          Icon(Icons.compare_arrows, size: 30),
        ],
        onTap: (index) {
          //Handle button tap
        },
      ),
      body: Container(color: Colors.blueAccent),
    )
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search