rotary_navbar 1.0.0
rotary_navbar: ^1.0.0 copied to clipboard
A customizable navigation bar with a curved design for Flutter applications.Which also rotates
Rotary NavBar #
A customizable navigation bar with a curved design for Flutter applications.
Features #
- Curved design with customizable arc radius
- Customizable colors for background, selected items, and unselected items
- Adjustable height and item spacing
- Smooth animations when switching between items
- Easy to integrate and customize
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
rotary_navbar: ^1.0.0
Then run:
$ flutter pub get
Usage
Import the package in your Dart file:
import 'package:rotary_navbar/rotary_navbar.dart';
Use the RotaryNavBar in your app:
RotaryNavbarBar(
items: [
NavBarItem(icon: Icons.home, label: 'Home'),
NavBarItem(icon: Icons.search, label: 'Search'),
NavBarItem(icon: Icons.person, label: 'Profile'),
NavBarItem(icon: Icons.settings, label: 'Settings'),
],
backgroundColor: Colors.black,
selectedItemColor: Colors.blue,
unselectedItemColor: Colors.grey,
arcRadius: 95,
height: 96,
itemSpacing: 0.35,
onItemSelected: (index) {
// Handle item selection
},
)
Customization Options
The CustomNavBar widget accepts the following parameters:
items: List of NavBarItem objects representing the navigation items (required)
backgroundColor: Color of the navigation bar background (default: Colors.black)
selectedItemColor: Color of the selected item icon and label (default: Color.fromARGB(255, 124, 77, 255))
unselectedItemColor: Color of the unselected item icons and labels (default: Colors.grey)
arcRadius: Radius of the curved arc (default: 95)
height: Height of the navigation bar (default: 96)
itemSpacing: Spacing between items, represented as a fraction of the screen width (default: 0.35)
onItemSelected: Callback function when an item is selected, provides the index of the selected item
Example
For a complete example of how to use the RotaryNavBar, please check the example folder in the package repository.
Contributing
Contributions are welcome! If you find a bug or want a feature, please open an issue.
License
This project is licensed under the MIT License - see the LICENSE file for details.