Animated Navigation-Bar in Flutter - Android Hire
Coding Tutorials

Animated Navigation-Bar in Flutter

Jayant dhingra
The Burger Menu is kind of outdated now. we all can observe that It’s all about Navigation-bars. Time to see how flutter let us play with the Navigation bar also not just the simple Navigation Bar even the animated kind we can see below.

Again we have two options to create a Navigation bar.

  • In-built features.

This feature is available in Scaffold( ) >> bottomNavigationbar : .

And then write your own code. To check out that option. Documentation is the best way to approach this.

(link:https://api.flutter.dev/flutter/material/BottomNavigationBar-class.html)

  • Third-party package for easy use.

The third party will Reduce your efforts and will provide a better version of the task. In this blog, we will be using yet another package that will provide us with an animated version of the Navigation Bar.

Scaffold( ) >> bottomNavigationbar : curvedNavigationBar()

(Disclaimer: I have not developed this package but I have used it many times and it gives me the best results so far. You can check the official documentation for the package at https://api.flutter.dev/flutter/material/BottomNavigationBar-class.html ).

But before that, I want to explain to you a little bit about the Navigation bar from my end. So yes basically as the name suggests it is used to navigate through screens, you can use swipe gestures or tap to play with them. The example, we are going to look at below will contain only three elements you can definitely change according to your need.

Essentials:

  • Pubsec.yaml dependices:

Dependencies:

curved_navigation_bar: ^ 0.3.3

  • Now import:
    • import 'package:curved_navigation_bar/curved_navigation_bar.dart';

Now time for some real deal. It’s coding time.

After the successful importing and adding of package dependencies. It's time to look up the code.

Some Screenshots just to get the idea of what are we trying to accomplish here: 

1.

2.

That’s pretty much it and now how to code it out.

Scaffold( appbar: ...... ,
body: .... ,
....
....
bottomNavigationBar: CurvedNavigationBar(
        color: Colors.white,
        backgroundColor: Colors.deepOrange,
        buttonBackgroundColor: Colors.white,
        height: 50.0,
        index: 1,
        animationDuration: Duration(
          milliseconds: 200,
        ),
        animationCurve: Curves.bounceIn,
        items: [
          Icon(Icons.verified_user, size: 20.0),
          Icon(Icons.add, size: 20.0),
          Icon(Icons.watch_later, size: 20.0),
        ],
        onTap: (index) {
          debugPrint('Any function you want to do example: navigate to screen');
        },
      ) 
);

Properties:

  • color: // color of the navigation bar.
  • backgroundColor: // background color for the icon Animation.
  • buttonBackgroundColor: // background color for the button.
  • animationDuration: // animation duration in millisonds {example: Duration(

milliseconds: 200,

), }

  • animationCurve: // type of animation you want (example: Curves.bounceIn)
  • Items: // In this party can customize accordingly I have used icons that SDK provides. You can use images two or your own icons.
  • index: // indexing the items from the above example it is ”1”.
  • onTap( ): // In this you have to specify the ontap action for each index.

For example in onTap( ) : (index) {

/// use if-else statements to navigate to different screens

}

That’s all about CurveNavigationBar in flutter if any doubts visit the resources below:

Resources:

  • Package Documentation:

https://pub.dev/packages/curved_navigation_bar

Jayant dhingra's profile picture

Jayant dhingra

As an enthusiast of stock markets and a skilled developer specializing in Android and augmented reality technologies, I am constantly driven to experiment with code.

Related Posts

7 Top Samsung Galaxy Ring Alternatives for 2025

7 Top Samsung Galaxy Ring Alternatives for 2025

Tired of waiting for the Samsung Galaxy Ring to hit the market? You’re not alone. The smart ring market already has many impressive alternatives available now, despite the buzz around Samsung’s upcoming smart ring. These devices pack advanced health tracking and contactless payment features that might surpass Samsung’s planned offerings. The current lineup of smart […]

What Is Quiet Mode on Instagram and How to Activate It

What Is Quiet Mode on Instagram and How to Activate It

Ever wondered what Quiet Mode on Instagram is all about? This simple yet powerful Instagram feature helps you take a break from the constant buzz of notifications and focus on what truly matters. Whether you’re striving for better work-life balance, dedicating time to studying, or simply trying to disconnect from social media distractions, Quiet Mode […]

How to Make a Bed in Minecraft (Step-by-Step Guide)

How to Make a Bed in Minecraft (Step-by-Step Guide)

A bed in Minecraft is very important. It lets you skip the night and set your spawn point, so if you die, you will return to your bed instead of the original world spawn. This guide will show you how to gather materials, craft a bed, and set your spawn point. We’ll also show you how to customize your bed, build bunk […]

10 Best MMORPG Games For Android

10 Best MMORPG Games For Android

Not too long ago, MMORPG games and powerful gaming consoles were mostly exclusive to PCs. They required high-end graphics and systems to deliver their immersive gameplay. But times have changed. With the rise of gaming-oriented smartphones, you can now enjoy PC-like gaming experiences on your Android device. Thanks to these technological advancements and faster internet […]

Roblox: Fruit Battlegrounds codes (January 2025)

Roblox: Fruit Battlegrounds codes (January 2025)

Fruit Battlegrounds codes are all about getting more gems and help you to shoot up your rank in this One Piece anime-inspired game. This Fruit Battlegrounds was made by Popo developer. It is an action-packed game where players battle it out using unique fruit-based abilities. With constant updates, new fruits, and exciting challenges, it’s a fruity frenzy you won’t […]

Roblox: Ultimate Football Codes (January 2025)

Roblox: Ultimate Football Codes (January 2025)

Want to get some extra items for Ultimate Football in Roblox? You’ve come to the right place! Here’s the latest list of codes to help you score touchdowns and look stylish on the field. These codes offer free rewards such as coins and cosmetics to enhance your gameplay. What are Ultimate Football Codes? Ultimate Football […]

Roblox: Da Hood Codes (January 2025)

Roblox: Da Hood Codes (January 2025)

Are you a fan of Roblox games, in this article we will look at the Roblox Da Hood Codes for December 2024 that will help you unlock exclusive items, improve your gameplay and dominate the streets of Da Hood. You can feel that the game is inspired by the Grand Theft Auto series and there […]