Flutter modern bottom navbar. Compatible with Android & iOS. You can customize it freely.

Overview

ss_bottom_navbar

Publish to Pub.dev

Flutter modern bottom nav bar. Compatible with Android & iOS. You can customize it freely.

Getting Started

dependencies:
  ss_bottom_navbar: 0.1.1
$  flutter pub get
import 'package:ss_bottom_navbar/src/ss_bottom_navbar.dart';

Example

SSBottomNav

Usage

Create Items
final items = [
  SSBottomNavItem(text: 'Home', iconData: Icons.home),
  SSBottomNavItem(text: 'Store', iconData: Icons.store),
  SSBottomNavItem(text: 'Add', iconData: Icons.add, isIconOnly: true),
  SSBottomNavItem(text: 'Explore', iconData: Icons.explore),
  SSBottomNavItem(text: 'Profile', iconData: Icons.person),
];
Create the state
SSBottomBarState _state = SSBottomBarState();
SSBottomNav(
  items: items,
  state: _state,
  color: Colors.black,
  selectedColor: Colors.white,
  unselectedColor: Colors.black,
  onTabSelected: (index) {
     debugPrint(index);
     setState(() {
        _index = index;
    });
  }
),
With bottom sheet dialog
SSBottomNav(
  items: items,
  state: _state,
  color: Colors.black,
  selectedColor: Colors.white,
  unselectedColor: Colors.black,
  visible: isVisible,
  bottomSheetWidget: Container(),
  showBottomSheetAt: 2,
  onTabSelected: (index) {}
),

Customization

Name Type Description
items List<SSBottomNavItem> list of SSBottomNavItem items
state SSBottomBarState state of the bottome bar as ChangeNotifier
iconSize double size of the icon on items
backgroundColor Color background color of the widget
color Color color of the slider
selectedColor Color items's color when selected
unselectedColor Color items's color when not selected
onTabSelected ValueChanged<int> function that returns the index on tab selected
shadow List<BoxShadow> shadow of the slider
visible bool visibilty of the SSBottomNavItem
bottomSheetWidget Widget child of the bottom sheet dialog
showBottomSheetAt int the index of SSBottomNavItem to show the SSBottomNavItem
bottomSheetHistory bool default true. option to go back previous tab if showBottomSheetAt pressed while SSBottomSheet showing
dismissedByAnimation ValueChanged<bool> function that returns true if SSBottomSheet dismissed by animation

SSBottomSheet

SSBottomSheet Showcase Image

If you want to use SSBottomNav's bottom sheet dialog, you can do that with SSBottomSheet

Usage
SSBottomSheet.show(
  context: context,
  child: bottomSheet(),
  onPressed: (offset) {}
);
bottomSheet() => Container(
  color: Colors.white,
  child: Column(
    children: [
      ListTile(
        leading: Icon(Icons.camera_alt),
        title: Text('Use Camera'),
      ),
      ListTile(
        leading: Icon(Icons.photo_library),
        title: Text('Choose from Gallery'),
      ),
      ListTile(
        leading: Icon(Icons.edit),
        title: Text('Write a Story'),
      ),
    ],
  ),
);
Dismiss the Bottom Sheet
Navigator.maybePop(context);

Customization

Name Type Description
Widget child child widget
backgroundColor Color background color of the widget
bottomMargin double margin from bottom acording to your bottom navbars height
onPressed ValueChanged<Offset> returns Offset when tapped

Contributions

Contributions of any kind are more than welcome! Feel free to fork and improve in any way you want, make a pull request, or open an issue.

Comments
  • [FEATURE] Option to go back to the previous item when showBottomSheetAt clicked while SSBottomSheet showing

    [FEATURE] Option to go back to the previous item when showBottomSheetAt clicked while SSBottomSheet showing

    Is your feature request related to a problem? Please describe. When showBottomSheetAt has no proper widget to show (because SSBottomSheet will be showing) gets clicked, SSBottomSheet dismisses.

    Describe the solution you'd like I'd like to start animation to previously clicked SSBottomNavItem's index.

    Describe alternatives you've considered

    • create a field named bottomSheetHistory
    • create a variable called _tempIndex to hold previously clicked SSBottomNavItem
    • in onTab
      • if index equals to showBottomSheetAt, save _tempIndex
      • else SSBottomSheet shows
    • in _onPressed(Offset offset)
      • if index equals to showBottomSheetAt and bottomSheetHistory is true,
        • _updateIndex(_tempIndex)
        • set _service.clickedIndex to _tempIndex for animation
      • else _updateIndex(index)
    enhancement 
    opened by buraktabn 1
  • AnimatedSize clipping the widget

    AnimatedSize clipping the widget

    I'm creating a bottom navigation bar. When the app launches, the default selected navigation tab extends as seen in the gif.

    The issue is when AnimatedSize starts the animate, borders cuts off. Therefore, the container's border-radius doesn't look good. I don't think I'm clipping the view.

    Stackoverflow question

    [issue]1

    https://github.com/NBK-Group/ss_bottom_navbar/blob/ef3daf99193f65833b8f78d2e9744a482bce4eaa/lib/views/slide_box.dart#L39-L58

    https://github.com/NBK-Group/ss_bottom_navbar/blob/ef3daf99193f65833b8f78d2e9744a482bce4eaa/lib/ss_bottom_navbar.dart#L159-L174

    bug help wanted question 
    opened by buraktabn 1
  • 0.0.4

    0.0.4

    Added the feature mentioned on issue #10. Could not find any good looking animation to hide it. Will think about it later for sure.

    SSBottomNav(
      items: items,
      visible: isVisible, // true
      onTabSelected: (index) {}
    ),
    
    opened by buraktabn 0
  • Option to hide bottom navbar

    Option to hide bottom navbar

    Something like this;

    SSBottomNav(
      items: items,
      color: Colors.black,
      selectedColor: Colors.white,
      unselectedColor: Colors.black,
      visible: true, // bool
      visibleDuration: Duration.zero, // Duration
      onTabSelected: (index) {},
    ),
    
    enhancement 
    opened by buraktabn 0
  • First `SSBottomNavItem` is not visible on first run

    First `SSBottomNavItem` is not visible on first run

    When the example app opens, the first item of the navbar is not visible. Pressing another navbar item makes the first one visible. flutter run -v don't show any errors at all.

    ezgif com-resize

    bug 
    opened by buraktabn 0
  • [BUG] Not working as expected

    [BUG] Not working as expected

    Describe the bug Can't get to calculate last 3 items positions and sizes.

    https://github.com/NBK-Group/ss_bottom_navbar/blob/162435c2eddaef4780c27f6036eadb90f862ec5a/lib/helper/empty_item.dart#L35-L41

    To Reproduce Steps to reproduce the behavior:

    1. Clone the repo
    2. Run on a real device

    Expected behavior Should be like this.

    Screenshots

    Smartphone (please complete the following information):

    • Android Emulators (first build runs smoothly but after hot restart, the same bug continues)
    • Android Device (Android 11)
    • iPhone 11 (iOS 14)
    bug help wanted 
    opened by buraktabn 0
Custom bottom bar - A bottom tool bar that can be swiped left or right to expose more tools.

custom_bottom_bar A bottom tool bar that can be swiped left or right to expose more tools. usage Create your custom bottom bars with up to four custom

null 4 Jan 26, 2020
This is a JazzCash UI clone ( Modern Wallet App in Pakistan), implementing modern app bar animmation. One can take a concept of making app bar with animation.

jazzcash_ui This is a JazzCash UI clone ( Modern Wallet App in Pakistan), implementing modern app bar animmation. One can take a concept of making app

null 9 Nov 27, 2022
An Adaptive Navigation Bar in flutter. Navbar changes according to the screen size.

Adaptive NavBar (adaptive_navbar) Table of contents General info Setup Conclusion Useful Resources Meet the developer General info adaptive_navbar is

Mouli Bheemaneti 3 Oct 17, 2022
A TabBarController that is easy to use for flutter developers. 🥰 It supports various styles of page navigation, and you can also use it to customize your favorite styles. 🍻🍻

easy_tab_controller A user-friendly TabBarController widget for flutter developer. Getting Started This project is a starting point for a Flutter plug

圆号本昊 3 May 26, 2022
Material color picker, you can customize colors. Selection in two step, first main color and after shades.

Flutter Material Color Picker Material Color picker is a Flutter widget, that can be customizable. By default, it's Material Colors, but you can defin

Jean-Charles Moussé 70 Nov 25, 2022
Flutter-nav-bottom-bar-tutorial - A flutter bottom navigation bar tutorial

Flutter Bottom Navigation Bar Tutorial A tutorial with various Flutter bottom na

Aleyna Eser 2 Oct 25, 2022
Whatsapp UI clone made with Flutter; it is compatible with any type of Android and iOS devices.

whats_app Whatsapp UI built with Flutter; it is compatible and responsive with any type of Android and iOS devices. Getting Started This project is a

Mustafa Nabavi 4 Sep 23, 2021
A action bottom sheet that adapts to the platform (Android/iOS).

Adaptive action sheet A action bottom sheet that adapts to the platform (Android/iOS). iOS Android Getting Started Add the package to your pubspec.yam

Daniel Ioannou 26 Sep 26, 2022
Fully customize & personalize news app, built with Flutter

MyNews A fully customize & personalize news app, featuring world & local news, and top-headlines topics Screenshots Technologies Front-end Flutter SDK

Omer Gamliel 22 Nov 2, 2022
dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on background

dosdownloader Dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on back

Md Abir Ahsan Tahmim 1 Dec 8, 2021
A Flutter plugin that provides assets abstraction management APIs without UI integration, you can get assets (image/video/audio) on Android, iOS and macOS.

photo_manager Photo/Assets management APIs for Flutter without UI integration, you can get assets (image/video/audio) from Android, iOS and macOS. 提供相

FlutterCandies 526 Jan 4, 2023
This is an application that uses the Flutter framework, SQFLite as a database to record blood pressure, blood sugar, BMI, or create medication reminders in multi mobile platforms You can run this project on iOS, Android

This is an application that uses the Flutter framework, SQFLite as a database to record blood pressure, blood sugar, BMI, or create medication reminders in multi mobile platforms You can run this project on iOS, Android

null 14 Dec 29, 2022
With this pack you can use the biometrics systems of Android and IOS devices.

native_auth With this pack you can use the biometrics systems of Android and IOS devices. It will ask for the user which the biometric authentication

Weliton Sousa 7 Nov 2, 2022
A Side Menu plugin for flutter and compatible with liquid ui for flutter

Liquid Shrink Side Menu A Side Menu plugin for flutter and compatible with liquid ui Side Menu Types There are 8 configuration of Liquid shrink side m

Raj Singh 18 Nov 24, 2022
A Dart client for FusionAuth, Flutter compatible

FusionAuth Dart Client If you're integrating FusionAuth with a Dart or Flutter application, this library will speed up your development time. For addi

FusionAuth 9 Dec 14, 2022
Dart and Flutter sealed class generator and annotations, with match methods and other utilities. There is also super_enum compatible API.

Dart Sealed Class Generator Generate sealed class hierarchy for Dart and Flutter. Features Generate sealed class with abstract super type and data sub

6thSolution 15 Jan 2, 2023
Flutter Client for the stability.ai GRPC protocol, should be compatible with grpc.stability.ai and hafriedlander/stable-diffusion-grpcserver

idea2art This is idea2.art, a Flutter client for the stability.ai GRPC API for Stable Diffusion. It's usable both with the cloud-based grpc.stability.

Hamish Friedlander 9 Dec 5, 2022
A flutter Package provides you a modern animated fancy segment

animated_segment This package will animates a segment. Package provides you a mo

MindInventory 24 Dec 10, 2022