搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案