All Projects → rickywen911 → Custom_bubble_navigation_bar

rickywen911 / Custom_bubble_navigation_bar

Licence: mit
A custom navigation bar with bubble click effect in Flutter

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Custom bubble navigation bar

Wrnavigationbar
超简单!!! 一行代码设置状态栏、导航栏按钮、标题、颜色、透明度,移动等 WRNavigationBar which allows you to change NavigationBar's appearance dynamically
Stars: ✭ 2,923 (+2710.58%)
Mutual labels:  navigationbar
Wrnavigationbar swift
WRNavigationBar which allows you to change NavigationBar's appearance dynamically
Stars: ✭ 576 (+453.85%)
Mutual labels:  navigationbar
Ultimatebarx
Make Android transparent statusbar and navigationbar easy.
Stars: ✭ 879 (+745.19%)
Mutual labels:  navigationbar
Kmnavigationbartransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically.
Stars: ✭ 3,274 (+3048.08%)
Mutual labels:  navigationbar
Easynavigation
一款超级简单的导航条管理工具。完全自定义导航条。没有UINavigationBar 和 UINavigationItem 这两个类。完全是对UIView的操作。
Stars: ✭ 393 (+277.88%)
Mutual labels:  navigationbar
Gknavigationbarviewcontroller
iOS自定义导航栏-导航栏联动
Stars: ✭ 637 (+512.5%)
Mutual labels:  navigationbar
WaveSideBar
Animated side bar view
Stars: ✭ 38 (-63.46%)
Mutual labels:  navigationbar
Efnavigationbar
An ordinary custom navigation bar.
Stars: ✭ 92 (-11.54%)
Mutual labels:  navigationbar
Uiwidget
一个集成TabLayout、UIAlertDialog、UIActionSheetDialog、UIProgressDialog、TitleBarView(自带沉浸式标题栏)、CollapsingTitleBarLayout、RadiusView(圆角及状态背景设置View解放shape文件)、KeyboardHelper(软键盘控制及遮挡控制类)、StatusViewHelper(状态栏沉浸帮助类)、NavigationViewHelper(导航栏沉浸式帮助类)、AlphaViewHelper(View透明度控制帮助类) 等项目常用UI库
Stars: ✭ 400 (+284.62%)
Mutual labels:  navigationbar
Animatedbottombar
A customizable and easy to use BottomBar navigation view with sleek animations, with support for ViewPager, ViewPager2, NavController, and badges.
Stars: ✭ 797 (+666.35%)
Mutual labels:  navigationbar
Eachnavigationbar
A custom navigation bar for each view controller.
Stars: ✭ 314 (+201.92%)
Mutual labels:  navigationbar
Tlyshynavbar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars!
Stars: ✭ 3,780 (+3534.62%)
Mutual labels:  navigationbar
Ultimatebar
[停止维护]Transparent statusbar and navigationbar
Stars: ✭ 655 (+529.81%)
Mutual labels:  navigationbar
Google nav bar
A modern google style nav bar for flutter.
Stars: ✭ 290 (+178.85%)
Mutual labels:  navigationbar
Evncustomsearchbar
🔍Born for iOS 11 and iPhone X SearchBar
Stars: ✭ 52 (-50%)
Mutual labels:  navigationbar
IRBottomNavigationView
Floating Bottom Navigation/Tab System
Stars: ✭ 48 (-53.85%)
Mutual labels:  navigationbar
Swipeviewcontroller
SwipeViewController is a Swift modification of RKSwipeBetweenViewControllers - navigate between pages / ViewControllers
Stars: ✭ 636 (+511.54%)
Mutual labels:  navigationbar
Immersionbar
android 4.4以上沉浸式状态栏和沉浸式导航栏管理,适配横竖屏切换、刘海屏、软键盘弹出等问题,可以修改状态栏字体颜色和导航栏图标颜色,以及不可修改字体颜色手机的适配,适用于Activity、Fragment、DialogFragment、Dialog,PopupWindow,一句代码轻松实现,以及对bar的其他设置,详见README。简书请参考:http://www.jianshu.com/p/2a884e211a62
Stars: ✭ 10,030 (+9544.23%)
Mutual labels:  navigationbar
React Native X Bar
🎩 A flexible, lightweight bar component for common UI patterns in React Native
Stars: ✭ 68 (-34.62%)
Mutual labels:  navigationbar
Ypnavigationbartransition
A Full functional UINavigationBar framework for making bar transition more natural! You don't need to call any UINavigationBar api, implementing YPNavigationBarConfigureStyle protocol for your view controller instead. (类似微信 iOS Navigation Bar 的切换方案)
Stars: ✭ 725 (+597.12%)
Mutual labels:  navigationbar

custom_navigation_bar

A custom navigation bar with bubble click effect.

pub package License: MIT Star on Github Star on Github

Overview

This project is inspired by this post from Dribbble and The Boring Flutter Development Show, Ep. 35

This package gives you a cute bubble effect when you click on the navigation bar.

Dribbble:

Implemented:

Gallery

How to install

Add this to your package's pubspec.yaml file:

dependencies:
  custom_navigation_bar: lastest version

Documentation

Attention

If you update from version under 0.6.0, there are some breaking changes in the version 0.6.0. The icon in CustomNavigationBarItem has changed from IconData to Widget.

old version

CustomNavigationBarItem(
      {@required this.icon,
      IconData selectedIcon,
      this.selectedTitle,
      this.unSelectedTitle,
      this.badgeCount = 0,
      this.showBadge = true})
      : selectedIcon = selectedIcon ?? icon;

  ///
  /// The icon of the item
  /// Typically the icon is an [Icon].
  ///
  final IconData icon;

new version

CustomNavigationBarItem(
      {@required this.icon,
      Widget selectedIcon,
      this.title,
      Text selectedTitle,
      this.badgeCount = 0,
      this.showBadge = false})
      : selectedIcon = selectedIcon ?? icon,
        selectedTitle = selectedTitle ?? title;

  ///
  /// The icon of the item
  /// Typically the icon is an [Icon].
  ///

  final Widget icon;      

You can customize these attributes in the navigation bar.

Attributes Type Description Default
scaleFactor double scale factor for the icon scale animation. 0.2
elevation double The z-coordinate of this CustomNavigationBar 8.0
items List item data in CustomNavigationBar required
selectedColor Color [Color] when [CustomNavigationBarItem] is selected [blueAccent]
unSelectedColor Color [Color] when [CustomNavigationBarItem] is not selected. grey[600]
onTap Function(int) callback function when item tapped null
currentIndex int current index of navigation bar. 0
iconSize double size of icon. also represent the max radius of bubble effect animation. 24.0
backgroundColor Color Background color of [CustomNavigationBar] Colors.white
strokeColor Color stroke color blueAccent
bubbleCurve Curve animation curve of bubble effect linear
scaleCurve Curve animation curve of scale effect linear
borderRadius Radius border radius of navigation bar Radius.zero
isFloating bool control if CustomNavigationBar is floating false
blurEffect bool control if CustomNavigationBar show blur effect false
opacity double control CustomNavigationBar blur effect opacity when blurEffect is true 0.8

Attention: If you set isFloating to true, I would recommand you to set extendBody to true in Scaffold for a better performance.

And for customize icon in the navigation bar, just put the icons you want in the CustomNavigationBarItem like this.

CustomNavigationBar(
        ...
        items: [
          CustomNavigationBarItem(
          icon: Icon(Icons.home),
          title: Text("hello"),
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.shopping_cart),
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.lightbulb_outline),
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.search),
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.account_circle),
        ),
        ],
        ...
      )

If you want add notification badge, just use like this

CustomNavigationBar(
        ...
        items: [
        CustomNavigationBarItem(
          icon: Icon(Icons.home),
          badgeCount: _badgeCounts[0],
          showBadge: _badgeShows[0],
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.shopping_bag),
          badgeCount: _badgeCounts[1],
          showBadge: _badgeShows[1],
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.lightbulb_outline),
          badgeCount: _badgeCounts[2],
          showBadge: _badgeShows[2],
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.search),
          badgeCount: _badgeCounts[3],
          showBadge: _badgeShows[3],
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.account_circle),
          badgeCount: _badgeCounts[4],
          showBadge: _badgeShows[4],
        ),
      ],
        ...
      )

To clear a badge, set showBadge to false

If you want add title under icon, just use like this

CustomNavigationBar(
      iconSize: 30.0,
      selectedColor: Color(0xff040307),
      strokeColor: Color(0x30040307),
      unSelectedColor: Color(0xffacacac),
      backgroundColor: Colors.white,
      items: [
        CustomNavigationBarItem(
          icon: Icon(Icons.home),
          title: Text("Home"),
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.shopping_cart),
          title: Text("Cart"),
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.lightbulb_outline),
          title: Text("Explore"),
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.search),
          title: Text("Search"),
        ),
        CustomNavigationBarItem(
          icon: Icon(Icons.account_circle),
          title: Text("Me"),
        ),
      ],
      currentIndex: _currentIndex,
      onTap: (index) {
        setState(() {
          _currentIndex = index;
        });
      },
    );

Example

Check example app for more details.

Contribute

Issues and pull requests are welcomed!!

Future Plans

  • [x] Code format
  • [x] Make it more like native navigation bar in Flutter.
  • [x] Better documentation
  • [ ] More customizations!! And more...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].