bnb_flutter 0.0.4 copy "bnb_flutter: ^0.0.4" to clipboard
bnb_flutter: ^0.0.4 copied to clipboard

A highly customizable Flutter bottom navigation bar package with smooth animations and flexible item support. Built for simplicity, responsiveness, and a native look and feel.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Bnb Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Bnb Flutter'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int selectedIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
        centerTitle: true,
      ),
      body: Center(
        child: Text("Selected Index : $selectedIndex"),
      ),
      bottomNavigationBar: BnbWidget(
        items: [
          BnbItem(
            iconData: Icons.home,
          ),
          BnbItem(
            iconData: Icons.list,
          ),
          BnbItem(
            iconData: Icons.settings,
          ),
          BnbItem(
            iconData: Icons.book_outlined,
          ),
          BnbItem(
            iconData: Icons.person,
          ),
        ],
        onTap: (p0) => setState(() {
          selectedIndex = p0;
        }),
        selectedIndex: selectedIndex,
        style: BnbStyle(
          iconSize: const Size(24, 24),
        ),
      ),
    );
  }
}
3
likes
150
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

A highly customizable Flutter bottom navigation bar package with smooth animations and flexible item support. Built for simplicity, responsiveness, and a native look and feel.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on bnb_flutter