• Stars
    star
    1,022
  • Rank 45,039 (Top 0.9 %)
  • Language
    Dart
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A beautiful and animated bottom navigation

Pub Awesome Flutter Widget Tests

Latest compatibility result for Stable channel Latest compatibility result for Beta channel Latest compatibility result for Dev channel



BottomNavyBar

A beautiful and animated bottom navigation. The navigation bar uses your current theme, but you are free to customize it.

Preview PageView
FanBottomNavyBar Gif Fix Gif

Customization (Optional)

BottomNavyBar

  • iconSize - the item icon's size
  • items - navigation items, required more than one item and less than six
  • selectedIndex - the current item index. Use this to change the selected item. Defaults to zero
  • onItemSelected - required to listen when an item is tapped it provides the selected item's index
  • backgroundColor - the navigation bar's background color
  • showElevation - if false the appBar's elevation will be removed
  • mainAxisAlignment - use this property to change the horizontal alignment of the items. It is mostly used when you have ony two items and you want to center the items
  • curve - param to customize the item change's animation
  • containerHeight - changes the Navigation Bar's height

BottomNavyBarItem

  • icon - the icon of this item
  • title - the text that will appear next to the icon when this item is selected
  • activeColor - the active item's background and text color
  • inactiveColor - the inactive item's icon color
  • textAlign - property to change the alignment of the item title

Getting Started

Add the dependency in pubspec.yaml:

dependencies:
  ...
  bottom_navy_bar: ^5.6.0

Basic Usage

Adding the widget

bottomNavigationBar: BottomNavyBar(
   selectedIndex: _selectedIndex,
   showElevation: true, // use this to remove appBar's elevation
   onItemSelected: (index) => setState(() {
              _selectedIndex = index;
              _pageController.animateToPage(index,
                  duration: Duration(milliseconds: 300), curve: Curves.ease);
    }),
   items: [
     BottomNavyBarItem(
       icon: Icon(Icons.apps),
       title: Text('Home'),
       activeColor: Colors.red,
     ),
     BottomNavyBarItem(
         icon: Icon(Icons.people),
         title: Text('Users'),
         activeColor: Colors.purpleAccent
     ),
     BottomNavyBarItem(
         icon: Icon(Icons.message),
         title: Text('Messages'),
         activeColor: Colors.pink
     ),
     BottomNavyBarItem(
         icon: Icon(Icons.settings),
         title: Text('Settings'),
         activeColor: Colors.blue
     ),
   ],
)

Use with PageView and PageController

class _MyHomePageState extends State<MyHomePage> {

  int _currentIndex = 0;
  PageController _pageController;

  @override
  void initState() {
    super.initState();
    _pageController = PageController();
  }

  @override
  void dispose() {
    _pageController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Bottom Nav Bar")),
      body: SizedBox.expand(
        child: PageView(
          controller: _pageController,
          onPageChanged: (index) {
            setState(() => _currentIndex = index);
          },
          children: <Widget>[
            Container(color: Colors.blueGrey,),
            Container(color: Colors.red,),
            Container(color: Colors.green,),
            Container(color: Colors.blue,),
          ],
        ),
      ),
      bottomNavigationBar: BottomNavyBar(
        selectedIndex: _currentIndex,
        onItemSelected: (index) {
          setState(() => _currentIndex = index);
          _pageController.jumpToPage(index);
        },
        items: <BottomNavyBarItem>[
          BottomNavyBarItem(
            title: Text('Item One'),
            icon: Icon(Icons.home)
          ),
          BottomNavyBarItem(
            title: Text('Item Two'),
            icon: Icon(Icons.apps)
          ),
          BottomNavyBarItem(
            title: Text('Item Three'),
            icon: Icon(Icons.chat_bubble)
          ),
          BottomNavyBarItem(
            title: Text('Item Four'),
            icon: Icon(Icons.settings)
          ),
        ],
      ),
    );
  }
}

More Repositories

1

my_flutter_challenges

Flutter project containing all my flutter UI challenges
Dart
1,012
star
2

titled_navigation_bar

A beautiful and simple bottom navigation bar with smooth animation when switching selected item.
Dart
371
star
3

flutter_delivery

A flutter app with custom navigation drawer
Dart
281
star
4

xtimer-flutter-app

Flutter timer app
Dart
275
star
5

IBackdrop

A library to simply use Backdrop in your project (make it easy). Read more ->
Kotlin
139
star
6

build_context

Access most used properties in your BuildContext instance.
Dart
138
star
7

flutter_famguard

A Flutter app for monitor members family
Dart
55
star
8

flutter-tasky-app

A Flutter Task App
Dart
53
star
9

crazy-switch

A beautiful switch made with Flutter
Dart
51
star
10

bloc_example

BLoC pattern example
Dart
51
star
11

doubleClick

A lib To handle double click on android View's components.
Java
48
star
12

catcher

A Multi-Platform game made with Flutter
Dart
29
star
13

booksy

A new Flutter app to read books provided by Google Books
Dart
24
star
14

slide_show_flutter

A simple animation challenge made with Flutter
C++
23
star
15

Delyo-Food-Delivery-Android

An Food Delivery concept UI.
Kotlin
21
star
16

slider_number_picker

Dart
20
star
17

Android-Advanced-Register-Login-UI

Android Advanced Register/Login design concept
Kotlin
17
star
18

banzo

Android app to learn languages
Kotlin
16
star
19

flutter_app_lifecycle

A new Flutter project that show you how to detect the app's lifecycle
Dart
16
star
20

flutter-bottomAppBar

Watch the tutorial video on Youtube ->
Dart
15
star
21

flutter_contest

Flutter project submitted on Flutter contest
Dart
14
star
22

crypto

Crypto is a currency app to converter coins and to see market stats.
Kotlin
13
star
23

appIntro

Um simples pacote para adicionar telas de introdução no seu aplicativo. Desenvolvido com a linguagem Kotlin.
Kotlin
11
star
24

AndroidCustomView

A sample of how to create custom view class (EditText with clear button)
Kotlin
11
star
25

Material-Design-Components-Sample

A repository to show all use case of Materia Design Components in Android
Kotlin
10
star
26

android-room-database-sample

Android Studio Room Database Sample
Kotlin
9
star
27

flutter-learning-path

Flutter learning path
8
star
28

Programmers

Uma rede social para programadores/desenvolvedores e amantes de tecnologias.
Java
8
star
29

alarm-manager-android

Scheduling Tasks with AlarmManager. Read more here ->
Kotlin
7
star
30

localize

A brand new localization service for your projects.
Dart
7
star
31

zero-football-app

A Football app made with Flutter
Dart
6
star
32

flutter-hero

Project sample about Hero animation, read more here ->
Dart
6
star
33

flutter_whatsapp_clone

A whatsapp clone using Flutter
Dart
6
star
34

pedromassango

6
star
35

movies_app

Dart
5
star
36

qr-code-scanner-sample

QR code scanner sample
Dart
5
star
37

startup-name-generator

Project made when studing in Google Code Lab. This is a simple startup name generator made with Flutter
Dart
5
star
38

herenow

A android location app based on user's contacts. Try it here ->
Kotlin
5
star
39

odd1out

Dart
5
star
40

flutter-navigator

This is repo contains sample code of Navigator in Flutter red more here
Dart
4
star
41

image_picker_example

This repository contains code to demostrate how to pick image from camera and gallery in Flutter
Dart
4
star
42

material-components-navigation-drawer

An android project showing a example of using the DawerLayout and NavigationView together
Kotlin
4
star
43

redux-sample

A Flutter project that implement redux state managment
Dart
4
star
44

flutter-architecture-samples

Flutter Architecture is a project to showcase different architectural approaches for Flutter projects. Its has different branches implementing the same app (a TODO app) using different architecture approaches..
4
star
45

architecture-bestpratice

Android project to show the best pratice with architecture components. The is a serie on Youtube, follow it ->
Kotlin
4
star
46

android-free-books

Um app para pesquisa, leitura e download de livros
Kotlin
3
star
47

inherited_widget_sample

A basic sample of InheritedWidget
Dart
3
star
48

qr_code_example

Qr code generator sample
Dart
3
star
49

chatty

This is an Android Chat App with Firebase
Java
3
star
50

flutter_as_android_module

Youtube video tutorial ->
Dart
3
star
51

Healthy

Medical application for cDa Hackathon. App for control / management of vaccines.
Java
2
star
52

android-koin

Android project that show the use of Koin for Dependency Injection with ViewModel and LiveData
Kotlin
2
star
53

fad

Dart
2
star
54

flutter_theme_sample

Dart
2
star
55

JobSchedulerSample

A JobScheduler android sample
Java
2
star
56

flutter-sliver-app-bar

Dart
2
star
57

flutter-changelog

Check the most important changes in the Flutter repository
C++
2
star
58

android-sqlite-java

A SQLite android database sample
Java
2
star
59

android-studio-bottom-navigation

A Sample of how to setup the Bottom Navigation View (from MaterialComponents Theme), with fragments
Kotlin
2
star
60

tap-android-game

Kotlin
2
star
61

smart_home

A Smart Home UI concept made with Flutter
Dart
2
star
62

FreeChat

Free FCM chat app
Java
1
star
63

keyper

An android project to store User's Passwords.
Java
1
star
64

algorithms-data-structures-with-kotlin

Kotlin
1
star
65

KotlinParcelize

An example of Kotlin Parcelize
Kotlin
1
star
66

Unit-Tests-Mockito

A project to learn unit tests with Mockito Library
1
star
67

pedromassango.github.io

My Portfolio made with Flutter
JavaScript
1
star
68

broadcastReceiver

A android broadcast receiver sample
Java
1
star
69

Console

Controle um computador pelo seu telefone Android
Kotlin
1
star
70

android-studio-databinding

Java
1
star
71

alc-challenge-android

Kotlin
1
star
72

kotlin-demo

Um conteiner de arquivos kotlin
Kotlin
1
star
73

AndroidKotlinCoroutines

Android project with kotlin coroutines sample
Kotlin
1
star
74

redux_simple_counter_app

A basic counter app using Redux
Dart
1
star