circular_bottom_navigation 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 92

Circular Bottom Navigation (or maybe a tab bar). #

Awesome Flutter

pub package APK

This is implementation of an artwork in Uplabs

Donate #

Support us by becoming a patron on Patreon

Patreon

Let's get started #

1 - Depend on it #

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

dependencies:
  circular_bottom_navigation: ^1.0.1

2 - Install it #

install packages from the command line: #

flutter packages get

3 - Import it #

Now in your Dart code, you can use: #

import 'package:circular_bottom_navigation/circular_bottom_navigation.dart';
import 'package:circular_bottom_navigation/tab_item.dart';

4 - CheatSheet #

5 - Use it like a charm #

Make your TabItems #

List<TabItem> tabItems = List.of([
    new TabItem(Icons.home, "Home", Colors.blue, labelStyle: TextStyle(fontWeight: FontWeight.normal)),
    new TabItem(Icons.search, "Search", Colors.orange, labelStyle: TextStyle(color: Colors.red, fontWeight: FontWeight.bold)),
    new TabItem(Icons.layers, "Reports", Colors.red),
    new TabItem(Icons.notifications, "Notifications", Colors.cyan),
  ]);

Use this widget everywhere you want #

CircularBottomNavigation(
      tabItems,
      selectedCallback: (int selectedPos) {
        print("clicked on $selectedPos");
      },
    )

how to use CircularBottomNavigationController #

With this controller you can read the current tab position, and set a new tab position on widget (without needing to rebuild the tree) with the widget built in animation.

Just create a new instance of controller

CircularBottomNavigationController _navigationController = 
new CircularBottomNavigationController(selectedPos);

Then pass it in your widget

CircularBottomNavigation(
      tabItems,
      controller: _navigationController,
    );

Now you can write (set new position with animation) and read value from it everywhere you want

// Write a new value 
_navigationController.value = 0;

// Read the latest value
int latest = _navigationController.value;

[1.0.1]

  • removed color although added labelStyle, circleColor properties in TabItem
  • removed circle handler shadow (due to apply material design rules)

[1.0.0]

  • added CheatSheet

[0.9.0]

  • added animationDuration property
  • added barBackgroundColor Property

[0.1.0]

  • Added CircularBottomNavigationController

[0.0.5]

  • ready to release

[0.0.2] - Beta 1.

  • Increased Circle size
  • Added scale factor on tab icons

[0.0.1] - Initial.

example/README.md

example #

The example implemented just like the (artwork)[https://www.uplabs.com/posts/bottom-tab] in uplabs.

Use this package as a library

1. Depend on it

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


dependencies:
  circular_bottom_navigation: ^1.0.1

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:circular_bottom_navigation/circular_bottom_navigation.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
89
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
87
Overall:
Weighted score of the above. [more]
92
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.03 points)

29 out of 30 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/circular_bottom_navigation.dart.

Run flutter format to format lib/circular_bottom_navigation.dart.

Format lib/tab_item.dart.

Run flutter format to format lib/tab_item.dart.

Maintenance suggestions

The package description is too short. (-13 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

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