All Projects → watery-desert → sliding_clipped_nav_bar

watery-desert / sliding_clipped_nav_bar

Licence: BSD-3-Clause License
Bottom navigation bar with sliding clip effect.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to sliding clipped nav bar

sweetalert
sweetalert for flutter
Stars: ✭ 52 (+13.04%)
Mutual labels:  flutter-package
anim search bar
A flutter package that has an animated search bar with loads of customization
Stars: ✭ 28 (-39.13%)
Mutual labels:  flutter-package
flutter material showcase
Material Design components showcase for Flutter apps. Use to check ThemeData with most Material widgets.
Stars: ✭ 22 (-52.17%)
Mutual labels:  flutter-package
sliding panel
A Flutter slidable widget that provides an easy to use configuration. Highly customisable. Just as you want it!
Stars: ✭ 88 (+91.3%)
Mutual labels:  flutter-package
flutter-devicelocale
A Flutter package to read and return the set device locales
Stars: ✭ 45 (-2.17%)
Mutual labels:  flutter-package
reactive state
An easy to understand reactive state management solution for Flutter.
Stars: ✭ 19 (-58.7%)
Mutual labels:  flutter-package
FlutterExpandableMenu
A new Flutter package which helps developers in creating Expandable Menu.
Stars: ✭ 18 (-60.87%)
Mutual labels:  flutter-package
Flutter-firestore-auth
Flutter mobile app with firestore authentication including Email and Social auth.
Stars: ✭ 95 (+106.52%)
Mutual labels:  flutter-package
bouncing widget
A widget that enables you to add a bouncing animation on a widget.
Stars: ✭ 34 (-26.09%)
Mutual labels:  flutter-package
water drop nav bar
flutter navigation bar with water drop effect.
Stars: ✭ 29 (-36.96%)
Mutual labels:  flutter-package
IQPlayer
Simple video player with subtitle for flutter.
Stars: ✭ 16 (-65.22%)
Mutual labels:  flutter-package
CustomSwitch
Custom Switch package created in Flutter
Stars: ✭ 56 (+21.74%)
Mutual labels:  flutter-package
flutter feather icons
Flutter package for Feather Icons
Stars: ✭ 33 (-28.26%)
Mutual labels:  flutter-package
flutter-rehberi
Flutter için Türkçe ve İngilizce kaynakların toplandığı rehber
Stars: ✭ 730 (+1486.96%)
Mutual labels:  flutter-package
eva icons flutter
Flutter package for Eva Icons. Eva Icons is a pack of more than 480 beautifully crafted Open Source icons for common actions and items. https://pub.dartlang.org/packages/eva_icons_flutter
Stars: ✭ 80 (+73.91%)
Mutual labels:  flutter-package
dartssh2
SSH and SFTP client written in pure Dart, aiming to be feature-rich as well as easy to use.
Stars: ✭ 63 (+36.96%)
Mutual labels:  flutter-package
nepali date picker
Material Style Date Picker with Bikram Sambat(Nepali) Calendar Support. Supports both Android and ios.
Stars: ✭ 30 (-34.78%)
Mutual labels:  flutter-package
glider
Server-side rendering for mobile apps, powered by Flutter
Stars: ✭ 20 (-56.52%)
Mutual labels:  flutter-package
time chart
A scrollable time chart in Flutter.
Stars: ✭ 21 (-54.35%)
Mutual labels:  flutter-package
lang table
lang_table is a dart plugin to generate string files from a source. Use a table to manage all multi-language resources. Inspired by fetch-mobile-localization-from-airtable
Stars: ✭ 17 (-63.04%)
Mutual labels:  flutter-package

Loading Animation Widget

YouTube Badge Instagram Badge Twitter Badge Discord Badge Patreon Badge BMC Badge pub package


How to use?

Add sliding_clipped_nav_bar: to your pubspec.yaml dependencies then run flutter pub get

Add from git [Latest and experimental version]

 dependencies:
  sliding_clipped_nav_bar:
    git:
      url: https://github.com/watery-desert/sliding_clipped_nav_bar  

Add from pub [Stable]

 dependencies:
  sliding_clipped_nav_bar:

Then import the package to use

import 'package:sliding_clipped_nav_bar/sliding_clipped_nav_bar.dart';

Add SlidingClippedNavBar() to bottomNavigationBar property of Scaffold() and add PageView() to body with NeverScrollableScrollPhysics() don't try to upate the seleted index from onPageChanged or will see some weird behaviour. You can use Stack() or AnimatedSwitcher() for custom page transition animation.

API reference

barItems → List<BarItem>

  • List of bar items that shows horizontally, Minimum 2 and maximum 4 items.
    required

selectedIndex → int

  • Selected index of the bar items.
    required

iconSize → double

  • Size of all icons (inactive items), don't make it too big or will be clipped.
    optional [30]

fontSize → double

  • FontSize of the text.
    optional [16]

fontWeight → FontWeight

  • FontWeight of the text.
    optional [FontWeight.bold]

fontStyle → FontStyle

  • FontStyle of the text.
    optional [null]

activeColor → Color

  • Color of the selected item which indicate selected.
    required

inactiveColor → Color?

  • Inactive color of item, which actually color icons.
    nullable

onButtonPressed → OnButtonPressCallback

  • Callback when item is pressed.
    required

backgroundColor → Color

  • background color of the bar.
    optional [Colors.white]

Design Credit & screen recording

Toolbar icons animation by Cuberto

Do and don't

  • Don't make icon size too big.

    • FontAwesomeIcons: 24
    • MaterialIcons: 30
  • Using SlidingClippedNavBar() when you want global active and inactive color.

 return Scaffold(
     
      body: PageView(
      physics: NeverScrollableScrollPhysics(),       
      controller: controller,
...
      ),
      bottomNavigationBar: SlidingClippedNavBar(
        backgroundColor: Colors.white,
        onButtonPressed: (index) {
          setState(() {
            selectedIndex = index;
          });
          controller.animateToPage(selectedIndex,
              duration: const Duration(milliseconds: 400),
              curve: Curves.easeOutQuad);
        },
        iconSize: 30,
        activeColor: Color(0xFF01579B),
        selectedIndex: selectedIndex,
        barItems: [
          BarItem(
            icon: Icons.event,
            title: 'Events',
          ),
          BarItem(
            icon: Icons.search_rounded,
            title: 'Search',
          ),
           /// Add more BarItem if you want
        ],
      ),
    );
  • Using SlidingClippedNavBar.colorful() when you want to set individual item active & inactive color.
return Scaffold(
    
     body: PageView(
     physics: NeverScrollableScrollPhysics(),
     controller: controller,
...
     ),
     bottomNavigationBar: SlidingClippedNavBar.colorful(
       backgroundColor: Colors.white,
       onButtonPressed: (index) {
         setState(() {
           selectedIndex = index;
         });
         controller.animateToPage(selectedIndex,
             duration: const Duration(milliseconds: 400),
             curve: Curves.easeOutQuad);
       },
       iconSize: 30,
       selectedIndex: selectedIndex,
       barItems: [
         BarItem(
           icon: Icons.event,
           title: 'Events',
           activeColor: Colors.amber,
           inactiveColor: Colors.red,
         ),
         BarItem(
           icon: Icons.search_rounded,
           title: 'Search',
           activeColor: Colors.red,
           inactiveColor: Colors.green,
         ),
        /// Add more BarItem if you want

       ],
     ),
   );

FAQ

  • How do I change the height?

The height must be constant because the animation is in vertical direction. According to me 60 is perfect. But if you think needs to be reduced then please create an issue with a screenshot. I will see if I can do something.

  • How do I add drop shadow?

Wrap SlidingClippedNavBar with DecoratedBox or Container and pass BoxDecoration to decoration property. BoxDecoration takes list of boxShadow there you can pass your drop shadow.

DecoratedBox(
    decoration: BoxDecoration(
      boxShadow: [
        BoxShadow(
            color: Colors.black.withOpacity(0.2),
            offset: Offset(0, 4),
            blurRadius: 8.0)
      ],
    ),
    child: SlidingClippedNavBar()
)
  • How do I change the corner radius of the navigation bar?

Wrap SlidingClippedNavBar with ClipRRect and pass BorderRadius to borderRadius property.

  ClipRRect(
      borderRadius: const BorderRadius.vertical(
        top: Radius.circular(16),
      ),
      child: SlidingClippedNavBar(
    )                

All flutter packages

Sliding Clipped Nav Bar
Water Drop Nav Bar
Swipeable Tile
Loading Animation Widget


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].