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

outdated

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,
        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
0
pub points
52%
popularity

Publisher

verified publisherviztushar.dev

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on bottom_nav