curved_navigation_bar 0.1.26

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

curved_navigation_bar #

pub package

A Flutter package for easy implementation of curved navigation bar.

Gif

Add dependency #

dependencies:
  curved_navigation_bar: ^0.1.26 #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
initialIndex: Initial index of Curve
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
curve: Curves interpolating button change animation, default Curves.easeOutCubic
duration: Duration of button change animation, default Duration(milliseconds: 600)

[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(
          initialIndex: 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.1.26

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages 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.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
0.1.2 Mar 9, 2019 Go to the documentation of curved_navigation_bar 0.1.2 Download curved_navigation_bar 0.1.2 archive
0.1.1 Mar 9, 2019 Go to the documentation of curved_navigation_bar 0.1.1 Download curved_navigation_bar 0.1.1 archive
0.1.0 Mar 9, 2019 Go to the documentation of curved_navigation_bar 0.1.0 Download curved_navigation_bar 0.1.0 archive
0.0.12 Mar 8, 2019 Go to the documentation of curved_navigation_bar 0.0.12 Download curved_navigation_bar 0.0.12 archive
0.0.11 Mar 7, 2019 Go to the documentation of curved_navigation_bar 0.0.11 Download curved_navigation_bar 0.0.11 archive

All 11 versions...

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

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.3.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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