搜索插件、代码仓与 APP 分类

fancy_bottom_navigation 封面
插件详情v0.3.3

fancy_bottom_navigation

适用于 Flutter 应用的动画底部导航栏,图标会动态进入位置,颜色可自定义。

近 30 天下载
356
喜欢数
229
Pub 分数
60

安装插件

flutter pub add fancy_bottom_navigation

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Fancy Bottom Navigation 是一个 Flutter 包,提供带有平滑图标过渡的动画底部导航栏,并支持自定义颜色。它通过在切换标签时提供动态视觉反馈,增强了移动应用的用户界面。动画效果使图标优雅地出现和消失,提升了整体用户体验。开发者可以轻松自定义外观和行为,以匹配其应用的设计语言。非常适合需要现代、吸引人导航模式的应用。

适合场景

  • 基于标签的导航移动应用
  • 通过动画过渡增强用户界面/用户体验
  • 自定义底部导航外观
  • 创建视觉上吸引人的仪表板
  • 设计交互式应用程序界面

主要特点

  • 动画图标过渡
  • 完全可自定义的颜色
  • 平滑的标签页切换效果
  • 与现有 Flutter 项目的轻松集成
  • 支持自定义图标和标签样式

适合对象

  • 寻求现代导航的 Flutter 开发人员
  • 注重视觉吸引力的应用程序
  • 需要动画UI组件的项目
  • 以设计为导向的移动应用
  • 希望快速导航增强功能的开发者

使用建议

  • 有限的平台特定自定义
  • 可能需要额外的样式来实现复杂布局
  • 未针对大量标签页进行优化
  • 动画性能在旧设备上可能有所不同
  • 需要手动处理状态管理

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

FancyBottomNavigation

Fancy Gif

Getting Started

Add the plugin (pub coming soon):

dependencies:
  ...
  fancy_bottom_navigation: ^0.3.2

Limitations

For now this is limited to more than 1 tab, and less than 5. So 2-4 tabs.

Basic Usage

Adding the widget

bottomNavigationBar: FancyBottomNavigation(
    tabs: [
        TabData(iconData: Icons.home, title: "Home"),
        TabData(iconData: Icons.search, title: "Search"),
        TabData(iconData: Icons.shopping_cart, title: "Basket")
    ],
    onTabChangedListener: (position) {
        setState(() {
        currentPage = position;
        });
    },
)

TabData

iconData -> Icon to be used for the tab
title -> String to be used for the tab
onClick -> Optional function to be used when the circle itself is clicked, on an active tab

Attributes

required

tabs -> List of TabData objects
onTabChangedListener -> Function to handle a tap on a tab, receives int position

optional

initialSelection -> Defaults to 0
circleColor -> Defaults to null, derives from Theme
activeIconColor -> Defaults to null, derives from Theme
inactiveIconColor -> Defaults to null, derives from Theme
textColor -> Defaults to null, derives from Theme
barBackgroundColor -> Defaults to null, derives from Theme
key -> Defaults to null

Theming

The bar will attempt to use your current theme out of the box, however you may want to theme it. Here are the attributes:

Fancy Theming

Programmatic Selection

To select a tab programmatically you will need to assign a GlobalKey to the widget. When you want to change tabs you will need to access the State using this key, and then call setPage(position).
See example project, main.dart, line 75 for an example.

Showcase

Using this package in a live app, let me know and I'll add you app here.

Inspiration

This package was inspired by a design on dribbble by Manoj Rajput:
https://dribbble.com/shots/5419022-Tab

Contributing

Contributions are welcome, please submit a PR :)

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目