搜尋套件、儲存庫與 APP 分類

套件詳情v0.1.5

ff_navigation_bar

可設定的底端導覽列,帶有浮起強調與陰影

近 30 天下載
116
喜歡數
159
Pub 分數
40

安裝套件

flutter pub add ff_navigation_bar

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個可自訂的 Flutter 底部導航列,具備凸起的強調效果與細膩的陰影,以增強視覺深度。設計上彈性且易於整合,讓開發者能客製化導航項目外觀與行為。此套件支援順暢過渡,並提供現代美學,適合需要直覺式底部導航的行動應用程式。非常適合多個區段或標籤頁的應用程式,其中使用者體驗與視覺清晰度為首要考量。

適用情境

  • 移動應用底部導航
  • 標籤式介面設計
  • 可自訂的導航欄
  • 增強的UI,帶有陰影
  • 現代應用程式美學

主要特色

  • 突出高亮效果
  • 微妙的陰影樣式
  • 高度可配置
  • 平滑過渡
  • 輕鬆整合

適合對象

  • 尋求現代導航的 Flutter 開發人員
  • 包含多個內容區段的應用程式
  • 注重設計的移動應用
  • 自定義UI實作
  • 需要視覺深度的項目

使用建議

  • 有限的平台特定自訂
  • 除了轉場之外,沒有內建動畫
  • 需要手動處理狀態管理
  • 未針對複雜的嵌套導航進行優化
  • 依賴外部樣式以實現完全自定義

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

ff_navigation_bar

A highly configurable navigation bar with emphasis for the selected item.

Add dependency

dependencies:
  ff_navigation_bar: ^0.1.5

Basic use

import 'package:flutter/material.dart';
import 'package:ff_navigation_bar/ff_navigation_bar.dart';
...
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'Demonstration',
            ),
          ],
        ),
      ),
      bottomNavigationBar: FFNavigationBar(
        theme: FFNavigationBarTheme(
          barBackgroundColor: Colors.white,
          selectedItemBorderColor: Colors.yellow,
          selectedItemBackgroundColor: Colors.green,
          selectedItemIconColor: Colors.white,
          selectedItemLabelColor: Colors.black,
        ),
        selectedIndex: selectedIndex,
        onSelectTab: (index) {
          setState(() {
            selectedIndex = index;
          });
        },
        items: [
          FFNavigationBarItem(
            iconData: Icons.calendar_today,
            label: 'Schedule',
          ),
          FFNavigationBarItem(
            iconData: Icons.people,
            label: 'Contacts',
          ),
          FFNavigationBarItem(
            iconData: Icons.attach_money,
            label: 'Bills',
          ),
          FFNavigationBarItem(
            iconData: Icons.note,
            label: 'Notes',
          ),
          FFNavigationBarItem(
            iconData: Icons.settings,
            label: 'Settings',
          ),
        ],
      ),
    );

Theme

The navbar has a Theme class which can be used to define the majority of appearance settings for the navbar and its items.

  • barBackgroundColor: The background color for the entire bar (default = white)
  • selectedItemBackgroundColor: The background color for the CircleAvatar widget used to display the selected item's icon (default = blueAccent)
  • selectedItemIconColor: The color for the selected item's icon (default = white)
  • selectedItemLabelColor: The color for the selected item's label (default = black)
  • selectedItemBorderColor: The color for the selected item's border (default = white)
  • unselectedItemBackgroundColor: The background color for unselected items (default = transparent)
  • unselectedItemIconColor: The color for unselected items' icons (default = grey)
  • unselectedItemLabelColor: The color for unselected items' icons (default = grey)
  • selectedItemTextStyle: The text style to use for the selected item's label. The selectedItemLabelColor takes priority over any color attribute of the style (defaults to size = 13.0, weight = Bold)
  • unselectedItemTextStyle: The text style to use for the unselected items' labels (defaults to size = 12.0, weight = Normal)
  • barHeight: The height for the bar (which is automatically included within a SafeArea widget)
  • itemWidth: The width to use for the selected item CircleAvater (default = 48.0)
  • showSelectedItemShadow: Indicates if the drop shadow below the selected item should be displayed (default = true)

FFNavigationBar Attributes

  • selectedIndex: The item number (zero indexed) which should be marked as selected
  • onSelectTab: Callback function to receive tap notifications using the typedef Function(int selectedIndex)
  • items: List of FFNavigationBarItem objects to be displayed as the bar's items
  • theme: A FFNavigationBarTheme theme object

FFNavigationBarItem

  • label: The String to display as the item's label
  • iconData: The IconData to use in the item's Icon
  • animationDuration: A Duration object which can be used to tweak the AnimatedContainer behaviour of the navigation bar item.
  • selectedBackgroundColor: A Color value which can override the theme's selectedItemBackgroundColor value for a specific navigation bar item (used to create different colors for each item)
  • selectedForegroundColor: A Color value which can override the theme's selectedItemIconColor value
  • selectedLabelColor: A Color value which can override the theme's selectedItemLabelColor value

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案