Search packages, repositories and app categories

curved_navigation_bar cover
Package detailsv1.0.6

curved_navigation_bar

Stunning Animating Curved Shape Navigation Bar. Adjustable color, background color, animation curve, animation duration.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
16.1K
Likes
2.1K
Pub points
160

Install package

flutter pub add curved_navigation_bar

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A visually appealing, animating curved navigation bar for Flutter apps. It offers customizable colors, background hues, animation curves, and duration settings to create dynamic and modern bottom navigation experiences. Ideal for applications seeking a unique, fluid interface with smooth transitions between tabs. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Custom app interfaces
  • Modern UI design
  • Animated bottom navigation
  • Cross-platform mobile apps
  • Interactive tab switching
  • Enhanced user experience

Key features

  • Animatable curved shape
  • Customizable colors
  • Adjustable animation curve
  • Configurable animation duration
  • Multi-platform support
  • Smooth transition effects

Suitable for

  • Design-focused Flutter developers
  • Apps needing unique navigation
  • Projects with modern UI aesthetics
  • Cross-platform application builders
  • Developers wanting animated components

Considerations

  • May impact performance on low-end devices
  • Limited customization beyond visual properties
  • Requires careful testing across platforms
  • Animation may not suit all app styles
  • Not ideal for simple navigation needs

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

curved_navigation_bar

pub package

A Flutter package for easy implementation of curved navigation bar.

Gif

Add dependency
dependencies:
  curved_navigation_bar: ^1.0.6 #latest version
Easy to use
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),
)
Attributes

items: List of Widgets
index: index of NavigationBar, can be used to change current index or to set initial index
color: Color of NavigationBar, default Colors.white
buttonBackgroundColor: background color of floating button, default same as color attribute
backgroundColor: Color of NavigationBar's background, default Colors.blueAccent
onTap: Function handling taps on items
animationCurve: Curves interpolating button change animation, default Curves.easeOutCubic
animationDuration: Duration of button change animation, default Duration(milliseconds: 600)
height: Height of NavigationBar, min 0.0, max 75.0
maxWidth: Allows to set the width of the navigation bar lower than the entire screen width by default
letIndexChange: Function which takes page index as argument and returns bool. If function returns false then page is not changed on button tap. It returns true by default\

Change page programmatically
 //State class
  int _page = 0;
  GlobalKey<CurvedNavigationBarState> _bottomNavigationKey = GlobalKey();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        bottomNavigationBar: CurvedNavigationBar(
          key: _bottomNavigationKey,
          items: <Widget>[
            Icon(Icons.add, size: 30),
            Icon(Icons.list, size: 30),
            Icon(Icons.compare_arrows, size: 30),
          ],
          onTap: (index) {
            setState(() {
              _page = index;
            });
          },
        ),
        body: Container(
          color: Colors.blueAccent,
          child: Center(
            child: Column(
              children: <Widget>[
                Text(_page.toString(), textScaleFactor: 10.0),
                ElevatedButton(
                  child: Text('Go To Page of index 1'),
                  onPressed: () {
                    //Page change using state does the same as clicking index 1 navigation button
                    final CurvedNavigationBarState? navBarState =
                        _bottomNavigationKey.currentState;
                    navBarState?.setPage(1);
                  },
                )
              ],
            ),
          ),
        ));
  }

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package