smart_nav_bar 1.0.1
smart_nav_bar: ^1.0.1 copied to clipboard
A customizable bottom navigation bar for Flutter with smooth animations and flexible styling options.
Smart Nav Bar 🚀 #
A beautifully animated and highly customizable bottom navigation bar for Flutter applications with smooth animations and flexible styling options.
✨ Features #
- Smooth Animations: Elegant scaling and color transitions
- Full Customization:
- Colors (active/inactive states)
- Icon sizes
- Animation curves
- Corner radius
- Padding/margins
- SVG Support: Vector icons out of the box
- Flexible Configuration: Adapts to any design system
- Lightweight: No unnecessary dependencies
🚀 Installation #
Add to your pubspec.yaml:
dependencies:
smart_nav_bar: ^1.0.1
Then run:
flutter pub get
🛠 Basic Usage #
import 'package:smart_nav_bar/smart_nav_bar.dart';
SmartNavBar(
currentIndex: _currentIndex,
items: const [
NavItem(iconPath: 'assets/home.svg', label: 'Home'),
NavItem(iconPath: 'assets/search.svg', label: 'Search'),
NavItem(iconPath: 'assets/profile.svg', label: 'Profile'),
],
onTap: (index) => setState(() => _currentIndex = index),
)
🎨 Customization #
Basic Styling #
SmartNavBar(
style: SmartNavBarStyle(
activeColor: Colors.blue,
inactiveColor: Colors.grey,
backgroundColor: Colors.white,
borderRadius: 20,
padding: EdgeInsets.all(12),
// ...
)
Advanced Options #
SmartNavBar(
animationConfig: AnimationConfig(
curve: Curves.easeOutQuad,
duration: Duration(milliseconds: 300),
itemConfig: ItemConfig(
iconSize: 24,
labelStyle: TextStyle(fontWeight: FontWeight.w600)),
// ...
)
📱 Screenshot #
Default and customized styles with badge support
How to add your screenshot: #
- Add image file to your project:
🔧 Advanced Features #
Add Badges #
NavItem(
iconPath: 'assets/notifications.svg',
label: 'Alerts',
badge: BadgeConfig(
count: 3,
color: Colors.red,
),
)
Custom Screen Builder #
SmartNavBar.withScreens(
currentIndex: _currentIndex,
items: [
NavItem(..., screen: HomeScreen()),
NavItem(..., screen: SearchScreen()),
],
)
🤝 Contributing #
Contributions are welcome! Please open an issue or PR on GitHub.
📜 License #
MIT - See LICENSE for details.