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

stage_navigation_bar 封面
套件詳情v0.1.0

stage_navigation_bar

一個用於美觀導航列的 Flutter 套件,選擇項目時帶有動畫效果。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
10
喜歡數
9
Pub 分數
150

安裝套件

flutter pub add stage_navigation_bar

套件介紹

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

一個 Flutter 套件,提供美觀的底端導航列,並在切換項目時具備流暢的動畫效果。它透過在導航過程中提供動態視覺反饋來提升使用者體驗,非常適合需要吸引人且現代化介面元素的應用程式。此套件支援 Android、iOS、Web、macOS、Windows 及 Linux 多個平台,確保跨裝置行為一致。透過 pub add 進行最少設定,開發者可快速將視覺豐富的導航解決方案整合至專案中。

適用情境

  • 行動應用程式導航
  • Web 應用程式介面
  • 跨平台桌面應用
  • 互動式UI原型
  • 現代應用程式設計實現

主要特色

  • 動畫項目選擇
  • 平滑過渡效果
  • 多平台支援
  • 與 pub 的輕鬆整合
  • 可自定外觀
  • 響應式設計

適合對象

  • 尋求動畫導航欄的開發者
  • 注重設計的 Flutter 應用程式
  • 針對多個平台的應用
  • UI/UX增強專案
  • 初學者到中級 Flutter 使用者

使用建議

  • 可能需要在舊裝置上進行效能測試
  • 超出基本樣式的自訂功能有限
  • 依賴外部動畫庫
  • 不適合簡單的靜態導航需求
  • 與其他導航套件可能存在衝突

原始 README

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

Static Badge Static Badge Static Badge

A beautiful navigation bar with animation when select item.

Top To Bottom

Table of contents

  1. Installing
  2. How To Use
  3. Showcase
  4. Example Project
  5. Contributors

🖥 Installing

Add Dependency
dependencies:
  stage_navigation_bar: ^0.1.0 #latest version
Import Package
import 'package:stage_navigation_bar/stage_navigation_bar.dart';

ℹ️ How To Use

Place your StageNavigationBar to the bottomNavigationBar slot of a Scaffold. Or in the bottom of your main page view.

Code
class StageNavigationBarExample extends StatefulWidget {
  const StageNavigationBarExample({super.key});

  @override
  State<StageNavigationBarExample> createState() =>
      _StageNavigationBarExampleState();
}

class _StageNavigationBarExampleState extends State<StageNavigationBarExample> {
  /// Your initial page
  int _selectedIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      bottomNavigationBar: StageNavigationBar(
        items: const [
          Icon(Icons.home_filled, color: Colors.white),
          Icon(Icons.favorite, color: Colors.white),
          Icon(Icons.search, color: Colors.white),
          Icon(Icons.person, color: Colors.white),
        ],
        selectedIndex: _selectedIndex,
        indicatorColor: Colors.amber,
        onTap: (int index) {
          setState(() {
            _selectedIndex = index;
          });
        },
      ),
    );
  }
}
Properties
  • animationDirection: Define the animation move shape when tap.
  • alignment: Alignment of the items.
  • barHeight: StageNavigationBar height.
  • barWidth: StageNavigationBar width.
  • indicatorHeight: Indicator line height.
  • itemPadding: Each item padding.
  • duration: Indicator animation Transition duration.
  • selectedIndex*: Current selected index.
  • indicatorColor*: Color of the indicator and the gradient.
  • onTap*: On item tap.
  • barPadding?: StageNavigationBar internal padding.
  • barMargin?: StageNavigationBar external padding.
  • decoration?: StageNavigationBar box decoration.
  • selectedIndicatorBorderRadius?: Selected item indicator border radius.
  • unselectedIndicatorBorderRadius?: Unselected item indicator border radius.
  • items!: StageNavigationBar items, List of widget.
  • itemsCount!: Items count for itemBuilder callback.
  • itemBuilder!: Callback will be called with indices greater than or equal to zero and less than itemsCount.
Default values
  • animationDirection = IndicatorAnimationDirection.topToBottom,
  • alignment = Alignment.center,
  • barHeight = 60,
  • barWidth = double.infinity
  • indicatorHeight = 5,
  • itemPadding = const EdgeInsets.all(0),
  • duration = const Duration(milliseconds: 200),
  • selectedIndicatorBorderRadius: default value depends on 'animationDirection' value,
  • unselectedIndicatorBorderRadius: default value depends on 'animationDirection' value,
IndicatorAnimationDirection Values
IndicatorAnimationDirection.top
IndicatorAnimationDirection.topToBottom
IndicatorAnimationDirection.centerToTop
IndicatorAnimationDirection.centerToBottom
IndicatorAnimationDirection.bottom
IndicatorAnimationDirection.bottomToTop
Event
onTap: (index){

}

🕹 Showcase

IndicatorAnimationDirection
animationDirection: IndicatorAnimationDirection.top

Top


animationDirection: IndicatorAnimationDirection.topToBottom

Top To Bottom


animationDirection: IndicatorAnimationDirection.centerToTop

Center To Top


animationDirection: IndicatorAnimationDirection.centerToBottom

Center To Bottom


animationDirection: IndicatorAnimationDirection.bottom

Bottom


animationDirection: IndicatorAnimationDirection.bottomToTop

Bottom To Top

📱 Example Project

Pub Example

Github Example Project

👨🏻‍💻 Contributors

Mohammad Alamoudi @mu7mmd

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。