haptome / dot_navigation_bar

A bottom navigation bar that you can customize with the options you need, without any limits. You can also customize the appearance of the navigation bar with simple smooth animations, providing a nice and clean UI/UX.
https://github.com/haptome/dot_navigation_bar
MIT License
45 stars 17 forks source link
dart floating-navigation-bar flutter flutter-package navigationbar

Dot Navigation Bar


undefined undefined
undefined undefined undefined undefined undefined
undefined undefined

A bottom navigation bar that you can customize with the options you need, without any limits. You can also customize the appearance of the navigation bar with simple smooth animations, providing a nice and clean UI/UX.

style1 Example flutter project


NEW


Getting Started

To install, add it to your pubspec.yaml file:

dependencies:
    dot_navigation_bar:
import 'package:dot_navigation_bar/dot_navigation_bar.dart';

How to use it

call DotNavigationBar's constructor:

If you want to show body behind the navbar, it should be true

      extendBody: true,

if you are not intersted inmaking round nav bar with show body behind the navbar you have to make that

      extendBody: false,
Widget build(BuildContext context) {
  return Scaffold(
    body: Center(),
    extendBody: true,//<------like this 
    bottomNavigationBar:  DotNavigationBar(
          currentIndex: _SelectedTab.values.indexOf(_selectedTab),
          onTap: _handleIndexChanged,
          dotIndicatorColor: Colors.black,
          // enableFloatingNavBar: false
          items: [

          ],
        ),
  );
}

basic implementation

   Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: Image.asset("assets/IMG.png"),
      ),
      bottomNavigationBar:  DotNavigationBar(
          currentIndex: _SelectedTab.values.indexOf(_selectedTab),
          onTap: _handleIndexChanged,
          // dotIndicatorColor: Colors.black,
          items: [
            /// Home
            DotNavigationBarItem(
              icon: Icon(Icons.home),
              selectedColor: Colors.purple,
            ),

            /// Likes
            DotNavigationBarItem(
              icon: Icon(Icons.favorite_border),
              selectedColor: Colors.pink,
            ),

            /// Search
            DotNavigationBarItem(
              icon: Icon(Icons.search),
              selectedColor: Colors.orange,
            ),

            /// Profile
            DotNavigationBarItem(
              icon: Icon(Icons.person),
              selectedColor: Colors.teal,
            ),

          ],
        ),
    );
  }

The constructor has 18 attributes related to the Widget:

default values

marginR = const EdgeInsets.symmetric(horizontal: 50, vertical: 20),

paddingR = const EdgeInsets.only(bottom: 5, top: 10),

borderRadius = 30,

backgroundColor = Colors.white, enableFloatingNavBar=true, enablePaddingAnimation=true

Contributors

@iamvivekkaushik @buraktabn @Zheng Xiangrui