In the world of mobile app development, user interface and navigation play crucial roles in creating engaging and intuitive experiences. As Flutter continues to grow in popularity, developers are always on the lookout for tools that can help them create unique and functional designs. Today, I'm excited to introduce FloatyNavBar, a new Flutter package that brings a fresh perspective to in-app navigation.
What is FloatyNavBar?
FloatyNavBar is a customizable floating navigation bar for Flutter applications. It provides a sleek and interactive way to navigate between tabs while offering an optional action button for additional functionality. With smooth animations and a variety of customization options, FloatyNavBar allows developers to create navigation experiences that stand out.
Key Features
- Customizable Tabs: Each tab can be fully customized with its own icon, title, and colors.
- Floating Action Button: Add a unique action button to each tab for quick access to important features.
- Smooth Animations: Enjoy fluid transitions between tabs and when showing/hiding the action button.
- Multiple Shapes: Choose from Circle, Rectangle, or Squircle shapes for your navigation bar.
- Easy Integration: Designed to work seamlessly with existing Flutter projects.
How to Use FloatyNavBar
Getting started with FloatyNavBar is straightforward. First, add the package to your pubspec.yaml
:
dependencies:
floaty_nav_bar: ^1.0.0
Then, import it in your Dart file:
import 'package:floaty_nav_bar/floaty_nav_bar.dart';
Now, you're ready to use FloatyNavBar in your app. Here's a basic example:
FloatyNavBar(
selectedTab: _selectedIndex,
tabs: [
FloatyTab(
isSelected: _selectedIndex == 0,
title: 'Home',
icon: Icon(Icons.home),
onTap: () => setState(() => _selectedIndex = 0),
),
FloatyTab(
isSelected: _selectedIndex == 1,
title: 'Search',
icon: Icon(Icons.search),
onTap: () => setState(() => _selectedIndex = 1),
floatyActionButton: FloatyActionButton(
icon: Icon(Icons.add),
onTap: () {
// Add action for search tab
},
),
),
FloatyTab(
isSelected: _selectedIndex == 2,
title: 'Profile',
icon: Icon(Icons.person),
onTap: () => setState(() => _selectedIndex = 2),
),
],
)
Customization Options
FloatyNavBar offers a wide range of customization options to fit your app's design:
- Tab Appearance: Customize colors, icons, and text styles for selected and unselected states.
- Action Button: Modify size, colors, and elevation of the floating action button.
- Navigation Bar Shape: Choose between Circle, Rectangle, and Squircle shapes.
- Animations: Adjust animation durations and curves to match your app's feel.
Why Choose FloatyNavBar?
- Unique Design: Stand out from standard bottom navigation bars with a floating, animated design.
- Flexibility: Adapt the navigation bar to fit various app styles and themes.
- Enhanced Functionality: The per-tab floating action button adds an extra layer of interactivity.
- Developer-Friendly: Easy to implement and customize, with clear documentation.
Conclusion
FloatyNavBar brings a fresh and modern approach to in-app navigation for Flutter applications. Whether you're building a new app or looking to revamp an existing one, FloatyNavBar offers the flexibility and style to elevate your user interface.
Give FloatyNavBar a try in your next Flutter project and see how it can transform your app's navigation experience. The package is open-source and available on pub.dev. We welcome contributions and feedback from the community to make FloatyNavBar even better.
Happy coding, and may your apps float to new heights with FloatyNavBar!
Get Started with FloatyNavBar
Ready to elevate your app's navigation? Here's where you can find FloatyNavBar and connect with the developer:
- Package on pub.dev: https://pub.dev/packages/floaty_nav_bar
- GitHub Repository: https://github.com/Mustafa7Ibrahim/floaty_nav_bar
About the Developer
FloatyNavBar is developed and maintained by Mustafa Ibrahim. If you'd like to connect or see more of Mustafa's work:
- LinkedIn: https://www.linkedin.com/in/mustafa7ibrahim/
- GitHub Profile: https://github.com/Mustafa7Ibrahim/
Feel free to reach out with any questions, suggestions, or contributions. Let's make Flutter development even more exciting together!
Top comments (0)