gradient_indicator_nav_bar 0.0.1 copy "gradient_indicator_nav_bar: ^0.0.1" to clipboard
gradient_indicator_nav_bar: ^0.0.1 copied to clipboard

custom gradient bottom navigation bar with indicator

Gradient Indicator Bottom Nav Bar #

Love the material AppBar? Do you want to add more color to the appbar? Here's a GradientAppBar.

It works just like the normal AppBar. Also with actions, back buttons, titles. So it's just your normal AppBar, but with a twist!

Screenshots #

image image

Getting Started #

  1. Install the dependency:
  $ flutter pub add gradient_indicator_nav_bar
  1. Import the package:
import 'package:gradient_indicator_nav_bar/gradient_indicator_nav_bar.dart'
  1. Replace your Scaffold AppBar with GradientAppBar.

class Example extends StatefulWidget {
  const Example({super.key});

  @override
  State<Example> createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  int index = 0;

  List<Widget> pages = [
    HomePage(),
    ProfilePage()
  ];

  List<NavBarItem> items = [
    NavBarItem(icon: Icons.home, label: 'Home'),
    NavBarItem(icon: Icons.person, label: 'Profile')
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      bottomNavigationBar: CustomNavBar(items: [], onChanged: (value){
        _onChanged(value);
      },),
      body: AnimatedSwitcher(
        duration: const Duration(milliseconds: 1200),
        child: pages[index],
      ),
    );
  }

  void _onChanged(int value) {
    index = value;
    setState(() {});
  }
}

2
likes
0
points
38
downloads

Publisher

unverified uploader

Weekly Downloads

custom gradient bottom navigation bar with indicator

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, provider

More

Packages that depend on gradient_indicator_nav_bar