GithubHelp home page GithubHelp logo

ileafsolutionspvtltd / animated_notch_bottom_bar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mindinventory/animated_notch_bottom_bar

0.0 0.0 0.0 254 KB

Tabbar component for Flutter

License: MIT License

C++ 32.18% C 1.40% Objective-C 0.07% Kotlin 0.24% Dart 42.50% Swift 2.21% HTML 3.47% CMake 17.93%

animated_notch_bottom_bar's Introduction

Animated Notch Bottom Bar

animated_notch_bottom_bar version Flutter Website Dart Website MIT License

A Flutter package for animating the position of selected item in bottomNavigationBar with notch like design. Inspired by react-native-tabbar-interaction plugin.

Features :

  • Supports any widget as as a bottom bar children.
  • Animates the notch toward selected item.
  • Create an optimized bottom navigation bar with beautiful animation.
  • Supports blur effect like iOS Tab View.

Getting Started

Add the dependency in pubspec.yaml:

dependencies:
  ...
  animated_notch_bottom_bar: ^1.0.0

Basic Usage

Place AnimatedNotchBottomBar in the bottomNavigationBar parameter of a Scaffold widget and provide NotchBottomBarController to AnimatedNotchBottomBar.

bottomNavigationBar:  AnimatedNotchBottomBar(
  notchBottomBarController: _controller,
  ...
)
Use any Widget as bottom bar item

You can also set any animated widget.

bottomNavigationBar:  AnimatedNotchBottomBar(
  pageController: _pageController,
  bottomBarItems: [
    const BottomBarItem(
        inActiveItem: Icon(
           Icons.home_filled,
            color: Colors.blueGrey,
        ),
        activeItem: Icon(
          Icons.home_filled,
          color: Colors.blueAccent,
        ),
        itemLabel: 'Page 1',
  ),
    const BottomBarItem(
        inActiveItem: Icon(
            Icons.star,
            color: Colors.blueGrey,
          ),
        activeItem: Icon(
            Icons.star,
            color: Colors.blueAccent,
        ),
        itemLabel: 'Page 2',
  ),

     ///svg item
    BottomBarItem(
        inActiveItem: SvgPicture.asset(
          'assets/search_icon.svg',
           color: Colors.blueGrey,
       ),
       activeItem: SvgPicture.asset(
          'assets/search_icon.svg',
           color: Colors.black,
       ),
       itemLabel: 'Page 3',
    ),
     ...
)
Remove margins
bottomNavigationBar:  AnimatedNotchBottomBar(
     ...
     removeMargins: true,     
     ...
)
Set bottom bar width
bottomNavigationBar:  AnimatedNotchBottomBar(
     ...
     bottomBarWidth: 500,     
     ...
)
Add animation duration
bottomNavigationBar:  AnimatedNotchBottomBar(
     ...
     durationInMilliSeconds: 300,     
     ...
)
Show/hide item label and style
bottomNavigationBar:  AnimatedNotchBottomBar(
     ...
     showLabel: true,
     itemLabelStyle: TextStyle(
                      color: Colors.black,
                      fontSize: 16.0
                    ),
     ...
)
Set Notch's color
bottomNavigationBar:  AnimatedNotchBottomBar(
     ...
      notchColor: Colors.black87,     
     ...
)
Customized Blur Effect (iOS Tab View)
bottomNavigationBar:  AnimatedNotchBottomBar(
    ...
    showBlurBottomBar: true,
    blurOpacity: 0.2,
    blurFilterX: 5.0,
    blurFilterY: 10.0,
    ...
)

Migrating to 1.0.0+

Starting with version 1.0.0 of the package, NotchBottomBarController have been added for control the animation instead of PageController. The pageController field has been removed and notchBottomBarController is required now.

AnimatedNotchBottomBar

  • notchBottomBarController - the controller which allows you to control the page.
  • bottomBarItems - navigation items, required more than one item and less than six.
  • onTap - required to listen when an item is tapped it provides the selected item's index.
  • color - the bottom bar's background color.
  • removeMargins - To remove side and bottom margins by default it's false.
  • bottomBarWidth - To provide width for web and desktop app.
  • durationInMilliSeconds - To set duration time in MilliSeconds.
  • showLabel: To show or hide the label under bottom bar item.
  • itemLabelStyle - the bottom bar's item text style.
  • showShadow - if false the bottom bar's elevation will be removed.
  • showBlurBottomBar - if true the bottom bar will look blur.
  • blurOpacity - to set opacity of blur effect.
  • blurFilterX - Creates an image filter that applies a Gaussian blur at x axis.
  • blurFilterY - Creates an image filter that applies a Gaussian blur at y axis.
  • notchColor - Customizable notch's color.

BottomBarItems

  • title - the bottom bar item label
  • activeItem - the selected item.
  • inActiveItem - the inactive item.

Guideline for contributors

Contribution towards our repository is always welcome, we request contributors to create a pull request to the main branch only.

LICENSE!

Animated Notch Bottom Bar is MIT-licensed.

Let us know!

We’d be really happy if you send us links to your projects where you use our component. Just send an email to [email protected] and do let us know if you have any questions or suggestion regarding our work.

animated_notch_bottom_bar's People

Contributors

jignesh-mind avatar deep-mindinventory avatar orkunnnn avatar mohit-chauhan-mi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.