sphere_bottom_navigation_bar 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 75

Sphere Bottom Navigation Bar #

Sphere Bottom Navigation Bar is flutter package, You can create beautiful awesome degined bottom navigation bar with importing this library

Getting Started #

1. Add the dependencies to [pubspec.yaml] #

dependencies:
   sphere_bottom_navigation_bar: ^1.0.0

2. Install it #

You can install packages from the command line:

$ flutter packages get

3. Import package #

import  'package:sphere_bottom_navigation_bar/sphere_bottom_navigation_bar.dart';

4. Example: #

bottomNavigationBar: SphereBottomNavigationBar(  
  defaultSelectedItem: 0,  
  sheetRadius: BorderRadius.only(  
      topLeft: Radius.circular(20), topRight: Radius.circular(20)),  
  onItemPressed: (index) => setState(() {  
        print('Selected item is - $index');  
      }),   
  navigationItems: [  
    BuildNavigationItem(  
      tooltip: 'Home',  
  itemColor: Color(0xFFFFD6B2),  
  icon: Icon(Icons.home),  
  selectedItemColor: Color(0xFFFFD6B2),  
  ),  
  BuildNavigationItem(  
      tooltip: 'Chat',  
  itemColor: Color(0xFFB2F4FF),  
  icon: Icon(Icons.chat),  
  selectedItemColor: Color(0xFFB2F4FF),  
  ),  
  BuildNavigationItem(  
      tooltip: 'Peoples',  
  itemColor: Color(0xFFCDB2FF),  
  icon: Icon(Icons.people),  
  selectedItemColor: Color(0xFFCDB2FF),  
  ),  
  BuildNavigationItem(  
        tooltip: 'Settings',  
  itemColor: Color(0xFFFFB2D9),  
  icon: Icon(Icons.settings),  
  selectedItemColor: Color(0xFFFFB2D9)),  
  ],  
),

Screenshots #

drawing drawing drawing

[0.0.1] - SAT 23 FEB 2019 #

  • Publish

[0.0.2] - SAT 23 FEB 2019 #

*Fixed some errors

[0.0.3] - SAT 23 FEB 2019 #

*Fixed Some Errors and README.MD

[1.0.0] - SAT 16 MARCH 2019 #

*Fixed Some Errors and And ADDED MIT License

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      debugShowMaterialGrid: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({
    Key key,
  }) : super(key: key);
  @override
  MyHomePageState createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  Color backgroudColor = Colors.white;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: backgroudColor,
      appBar: AppBar(
        backgroundColor: backgroudColor,
        title: Center(child: Text('Sphere Bottom Navigation')),
        elevation: 0,
      ),
      bottomNavigationBar: SphereBottomNavigationBar(
        defaultSelectedItem: 0,
        sheetRadius: BorderRadius.only(
            topLeft: Radius.circular(20), topRight: Radius.circular(20)),
        onItemPressed: (index) => setState(() {
              print('Selected item is - $index');
              switch (index) {
                case 0:
                  backgroudColor = Color(0xFFFFD6B2);
                  break;
                case 1:
                  backgroudColor = Color(0xFFB2F4FF);
                  break;
                case 2:
                  backgroudColor = Color(0xFFCDB2FF);
                  break;
                case 3:
                  backgroudColor = Color(0xFFFFB2D9);
                  break;
                default:
              }
            }),
        onItemLongPressed: (index) => setState(() {
              backgroudColor = Color(0xFF44D6B2);
            }),
        navigationItems: [
          BuildNavigationItem(
            tooltip: 'Home',
            itemColor: Color(0xFFFFD6B2),
            icon: Icon(Icons.home),
            selectedItemColor: Color(0xFFFFD6B2),
          ),
          BuildNavigationItem(
            tooltip: 'Chat',
            itemColor: Color(0xFFB2F4FF),
            icon: Icon(Icons.chat),
            selectedItemColor: Color(0xFFB2F4FF),
          ),
          BuildNavigationItem(
            tooltip: 'Peoples',
            itemColor: Color(0xFFCDB2FF),
            icon: Icon(Icons.people),
            selectedItemColor: Color(0xFFCDB2FF),
          ),
          BuildNavigationItem(
              tooltip: 'Settings',
              itemColor: Color(0xFFFFB2D9),
              icon: Icon(Icons.settings),
              selectedItemColor: Color(0xFFFFB2D9)),
        ],
      ),
      body: Container(
        color: backgroudColor,
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  sphere_bottom_navigation_bar: ^1.0.0

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

We analyzed this package on Jul 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [sphere_bottom_navigation_bar] that is in a package requiring null.

Maintenance suggestions

Package is getting outdated. (-31.23 points)

The package was last published 68 weeks ago.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test