personalized_bottom_navbar 0.0.2 copy "personalized_bottom_navbar: ^0.0.2" to clipboard
personalized_bottom_navbar: ^0.0.2 copied to clipboard

A custom bottom navigation bar package for Flutter, supporting enums and custom widgets.

example/lib/main.dart

// ignore_for_file: library_private_types_in_public_api

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: MyHomePage(),
    );
  }
}

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

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Personalized Bottom Navbar Example')),
      body: Center(child: Text('Selected Index: $_currentIndex')),
      bottomNavigationBar: PersonalizedBottomNavBar(
        type: NavBarType.shadowEffectOnSelection,
        items: const [
          BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
          BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'),
          BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Profile'),
        ],
        currentIndex: _currentIndex,
        onTap: (index) {
          setState(() {
            _currentIndex = index;
          });
        },
        // Example of additional parameters:
        elevation: 8.0,
        iconSize: 30.0,
        selectedFontSize: 14.0,
        unselectedFontSize: 12.0,
      ),
    );
  }
}
6
likes
130
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

A custom bottom navigation bar package for Flutter, supporting enums and custom widgets.

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on personalized_bottom_navbar