curved_navigation_bar 0.2.20

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 95

curved_navigation_bar #

pub package

A Flutter package for easy implementation of curved navigation bar.

Gif

Add dependency #

dependencies:
  curved_navigation_bar: ^0.2.20 #latest version

Easy to use #

Scaffold(
  bottomNavigationBar: CurvedNavigationBar(
    backgroundColor: Colors.blueAccent,
    items: <Widget>[
      Icon(Icons.add, size: 30),
      Icon(Icons.list, size: 30),
      Icon(Icons.compare_arrows, size: 30),
    ],
    onTap: (index) {
      //Handle button tap
    },
  ),
  body: Container(color: Colors.blueAccent),
)

Attributes #

items: List of Widgets
index: index of NavigationBar, can be used to change current index or to set initial index
color: Color of NavigationBar, default Colors.white
buttonBackgroundColor: background color of floating button, default same as color attribute
backgroundColor: Color of NavigationBar's background, default Colors.blueAccent
onTap: Function handling taps on items
animationCurve: Curves interpolating button change animation, default Curves.easeOutCubic
animationDuration: Duration of button change animation, default Duration(milliseconds: 600)
height: Height of NavigationBar, min 0.0, max 75.0

[0.2.20]

  • TextDirection Right-To-Left and Left-To-Right auto support

[0.2.11]

  • remove debug print

[0.2.1]

  • height can be equal to 0.0

[0.2.0]

  • navigation bar index change available via index param, adjustable height via height param, minimum items: 1

[0.1.26]

  • Make Surface area for button clicks bigger

[0.1.25]

  • add buttonBackgroundColor param

[0.1.24]

  • readme grammar fix

[0.1.23]

  • fix initialIndex

[0.1.22]

  • make package usable on flutter stable version

[0.1.2]

  • update Readme dependency version

[0.1.1]

  • update Readme package usage and package link

[0.1.0]

  • update Readme

[0.0.12]

  • add Example

[0.0.1]

  • Initial version, 07.03.2018

example/example.dart

import 'package:flutter/material.dart';
import 'package:curved_navigation_bar/curved_navigation_bar.dart';

void main() => runApp(MaterialApp(home: BottomNavBar()));

class BottomNavBar extends StatefulWidget {
  @override
  _BottomNavBarState createState() => _BottomNavBarState();
}

class _BottomNavBarState extends State<BottomNavBar> {
  int _page = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        bottomNavigationBar: CurvedNavigationBar(
          index: 0,
          height: 75.0,
          items: <Widget>[
            Icon(Icons.add, size: 30),
            Icon(Icons.list, size: 30),
            Icon(Icons.compare_arrows, size: 30),
            Icon(Icons.call_split, size: 30),
            Icon(Icons.perm_identity, size: 30),
          ],
          color: Colors.white,
          buttonBackgroundColor: Colors.white,
          backgroundColor: Colors.blueAccent,
          animationCurve: Curves.easeInOut,
          animationDuration: Duration(milliseconds: 600),
          onTap: (index) {
            setState(() {
              _page = index;
            });
          },
        ),
        body: Container(
          color: Colors.blueAccent,
          child: Center(
            child: Text(_page.toString(), textScaleFactor: 10.0),
          ),
        ));
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  curved_navigation_bar: ^0.2.20

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:curved_navigation_bar/curved_navigation_bar.dart';
  
Version Uploaded Documentation Archive
0.2.20 Jun 3, 2019 Go to the documentation of curved_navigation_bar 0.2.20 Download curved_navigation_bar 0.2.20 archive
0.2.11 May 19, 2019 Go to the documentation of curved_navigation_bar 0.2.11 Download curved_navigation_bar 0.2.11 archive
0.2.2 Jun 3, 2019 Go to the documentation of curved_navigation_bar 0.2.2 Download curved_navigation_bar 0.2.2 archive
0.2.1 Apr 12, 2019 Go to the documentation of curved_navigation_bar 0.2.1 Download curved_navigation_bar 0.2.1 archive
0.2.0 Apr 11, 2019 Go to the documentation of curved_navigation_bar 0.2.0 Download curved_navigation_bar 0.2.0 archive
0.1.26 Mar 15, 2019 Go to the documentation of curved_navigation_bar 0.1.26 Download curved_navigation_bar 0.1.26 archive
0.1.25 Mar 13, 2019 Go to the documentation of curved_navigation_bar 0.1.25 Download curved_navigation_bar 0.1.25 archive
0.1.24 Mar 12, 2019 Go to the documentation of curved_navigation_bar 0.1.24 Download curved_navigation_bar 0.1.24 archive
0.1.23 Mar 12, 2019 Go to the documentation of curved_navigation_bar 0.1.23 Download curved_navigation_bar 0.1.23 archive
0.1.22 Mar 10, 2019 Go to the documentation of curved_navigation_bar 0.1.22 Download curved_navigation_bar 0.1.22 archive

All 16 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
95
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
95
Learn more about scoring.

We analyzed this package on Jun 26, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (1 direct: meta).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
flutter 0.0.0
meta ^1.1.6 1.1.6 1.1.7
Transitive dependencies
collection 1.14.11
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test