flexi_bottom_nav
FlexiBottomNavigation 是一个可自定义的 Flutter 底部导航小部件。它允许您轻松创建带有可配置图标、标签和颜色的底部导航栏,让您能够灵活地根据应用需求定制导航体验。
FlexiBottomNavigation 是一个可自定义的 Flutter 底部导航小部件。它允许您轻松创建带有可配置图标、标签和颜色的底部导航栏,让您能够灵活地根据应用需求定制导航体验。
{"sdk":"flutter"}{"sdk":"flutter"}^1.20.0^3.0.0以下为英文项目原文快照,最新内容请访问 GitHub。
FlexiBottomNavigation is a customizable bottom navigation widget for Flutter. It allows you to easily create a bottom navigation bar with configurable icons, labels, and colors, giving you the flexibility to tailor the navigation experience to your app's needs.
To use FlexiBottomNavigation in your Flutter project, follow these steps:
Add the Dependency:
Add flexi_bottom_nav to your pubspec.yaml file:
flexi_bottom_nav: 0.0.1
dependencies:
flutter:
sdk: flutter
flexi_bottom_nav: 0.0.1
pub add flexi_bottom_nav
Install the Package:
Run flutter pub get to install the package.
Here’s a simple example of how to use FlexiBottomNavigation in your Flutter application:
import 'package:flutter/material.dart';
import 'package:flexi_bottom_nav/flexi_bottom_nav.dart';
void main() {
runApp(MaterialApp(
home: FlexiBottomNavigation(
screens: [
Scaffold(body: Center(child: Text('Screen 1'))),
Scaffold(body: Center(child: Text('Screen 2'))),
Scaffold(body: Center(child: Text('Screen 3'))),
],
labels: ['Home', 'Search', 'Profile'],
icons: [Icons.home, Icons.search, Icons.person],
iconColors: [Colors.blue, Colors.green, Colors.red],
textSize: 14.0,
iconSize: 30.0,
selectedItemColor: Colors.red,
unselectedItemColor: Colors.blueGrey,
),
));
}
For more advanced usage and customization, check the example folder included in the package.