bottom_nav 1.0.1 copy "bottom_nav: ^1.0.1" to clipboard
bottom_nav: ^1.0.1 copied to clipboard

A bottom navigation bar with expanding titles and icons with Rounded Background.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Bottom NavBar',
      theme: ThemeData(
        primaryColor: Colors.white,
      ),
      debugShowCheckedModeBanner: false,
      home: MyHome(),
    );
  }
}

class MyHome extends StatefulWidget {
  @override
  _MyHomeState createState() => _MyHomeState();
}

class _MyHomeState extends State<MyHome> {
  int currentTab = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Example"),
      ),
      body: Container(),
      bottomNavigationBar: BottomNav(
        index: currentTab,
        backgroundColor: Colors.white,
        showElevation: true,
        navBarHeight: 75.0,
        radius: 30.0,
        onTap: (i) {
          setState(() {
            currentTab = i;
          });
        },
        items: [
          BottomNavItem(
              icon: Icons.home, label: "Home", selectedColor: Colors.amber),
          BottomNavItem(
              icon: Icons.favorite, 
              label: "Likes", 
              selectedColor: Colors.pink),
          BottomNavItem(
              icon: Icons.search, 
              label: "Search", 
              selectedColor: Colors.blue),
          BottomNavItem(
              icon: Icons.person,
              label: "Profile",
              selectedColor: Colors.black),
        ],
      ),
    );
  }
}
1
likes
130
pub points
50%
popularity

Publisher

verified publisherviztushar.dev

A bottom navigation bar with expanding titles and icons with Rounded Background.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on bottom_nav