Coder Social home page Coder Social logo

trendingtechnology / titled_navigation_bar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pedromassango/titled_navigation_bar

0.0 1.0 0.0 700 KB

A beautiful and simple bottom navigation bar with smooth animation when switching selected item.

License: MIT License

Kotlin 3.97% Objective-C 8.77% Dart 87.25%

titled_navigation_bar's Introduction

Pub Awesome Flutter

Titled Bottom Navigation Bar

A beautiful, clean and simple bottom navigation bar with smooth animation on click. This package is high customizable, read more bellow for more details.

You can see the source code of this lib inside the /lib folder.

Show some ❤️ and star the repo to support this project

Preview (default mode)

Default Mode Gif

Preview (with reverse mode)

Reversed Mode Gif

Package overview

  • Custom icon color
  • Custom indicator color
  • Support from two to five items
  • Reverse mode (show selected item as icon or title)
  • Option to define custom item background color
  • Use currentIndex property to update the Bar giving a tab position
  • No need setState(...) to update the current index
  • Support RTL TextDirection (thanks to Victor Uvarov)

Getting Started

Follow these steps to use this library

Add the plugin:

dependencies:
  ...
  titled_navigation_bar: ^5.0.0-nullsafety.0

Import the package

import 'package:titled_navigation_bar/titled_navigation_bar.dart';

Adding the widget

bottomNavigationBar: TitledBottomNavigationBar(
  currentIndex: 2, // Use this to update the Bar giving a position
  onTap: (index){
    print("Selected Index: $index");
  },
  items: [
      TitledNavigationBarItem(title: Text('Home'), icon: Icons.home),
      TitledNavigationBarItem(title: Text('Search'), icon: Icons.search),
      TitledNavigationBarItem(title: Text('Bag'), icon: Icons.card_travel),
      TitledNavigationBarItem(title: Text('Orders'), icon: Icons.shopping_cart),
      TitledNavigationBarItem(title: Text('Profile'), icon: Icons.person_outline),
  ]
)

Customization (Optional)

TitledBottomNavigationBar

onTap - Use this to get notified when an item is clicked, you can retrieve the current item's index on this function. Should not be null!
items - The items of your bottom navigation bar. Use the TitledNavigationBarItem class to add items. Should not be null!
curve - Use this to define your custom curve animation. Should not be null!
reverse - If true, the visible widget of the selected item will be the Text (with the title of the item). If false, the visible widget of the selected item will be the icon. Default to false
activeColor - The active Text/Icon color. The default color is the indicatorColor of your app Theme.
inactiveColor - The inactive Text/Icon color. The default is the black color.
indicatorColor - The indicator color. The default color is the indicatorColor of your app Theme.
currentIndex - Use this to update the Bar giving a position.
enableShadow - Use this to remove the NavigationBar's shadow

TitledNavigationBarItem

icon -The icon of this item. This will be used as default state if reverse mode is disabled
title - The title of this item. This will be used as default state if reverse mode is enabled

titled_navigation_bar's People

Contributors

devonjerothe avatar fourleaftec avatar jesusrp98 avatar magixyu avatar pedromassango avatar rafaelbeco avatar victoruvarov avatar

Watchers

 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.