gradient_bottom_navigation_bar 1.0.0+4 copy "gradient_bottom_navigation_bar: ^1.0.0+4" to clipboard
gradient_bottom_navigation_bar: ^1.0.0+4 copied to clipboard

A material Bottom Navigation Bar with a linear gradient option.

Gradient Bottom Navigation Bar #

pub package

This package allows you to add a gradient to the standard Material Bottom Navigation Bar.

Getting Started #

First, add this line in your project's pubspec.yaml

dependencies:
  ...
  gradient_bottom_navigation_bar: ^1.0.0+4

For help getting started with Flutter, view the online documentation.

Usage examples #

Import gradient_bottom_navigation_bar.dart in your desired class

import 'package:gradient_bottom_navigation_bar/gradient_bottom_navigation_bar.dart';

...

Basic implementation #

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Example'),
      ),
      body: Center(
        child: _widgetOptions.elementAt(_selectedIndex),
      ),
      bottomNavigationBar: GradientBottomNavigationBar(
        backgroundColorStart: Colors.purple,
        backgroundColorEnd: Colors.deepOrange,
        items: <BottomNavigationBarItem>[
          BottomNavigationBarItem(icon: Icon(Icons.home), title: Text('Home')),
          BottomNavigationBarItem(icon: Icon(Icons.business), title: Text('Business')),
          BottomNavigationBarItem(icon: Icon(Icons.school), title: Text('School')),
        ],
        currentIndex: _selectedIndex,
        onTap: _onItemTapped,
      ),
    );
  }

You can also check the example for additional information.

Screenshots #

Example

12
likes
40
pub points
59%
popularity

Publisher

verified publishercodeandblues.com

A material Bottom Navigation Bar with a linear gradient option.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on gradient_bottom_navigation_bar