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

rolling_bottom_bar 封面
套件詳情v0.2.2

rolling_bottom_bar

用於顯示動態底部欄並以球形作為指示器的套件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
162
喜歡數
38
Pub 分數
140

安裝套件

flutter pub add rolling_bottom_bar

套件介紹

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

一個 Flutter 套件,實現了一個動態底端導航列,具有滾動球形指示器。球體在欄位中平滑動畫移動以指示目前選中的標籤,提供現代且互動的使用者體驗。支援 Android、iOS、Web、macOS、Windows 與 Linux 等多個平台。此套件輕量且可自訂,讓開發者能調整顏色、大小與動畫速度。適合尋求視覺吸引人且流暢過渡的導航介面之應用。

適用情境

  • 行動應用程式導航
  • Web 應用程式介面
  • 跨平台UI設計
  • 互動式標籤切換
  • 現代應用程式美學

主要特色

  • 滾動球指示器
  • 流暢的動畫
  • 跨平台支援
  • 可自定外觀
  • 輕量級實現

適合對象

  • 尋求現代導航的開發者
  • 具有多個標籤頁的應用程式
  • 注重設計的 Flutter 項目
  • 互動式 UI 組件
  • 跨平台應用程式

使用建議

  • 可能需要在低階設備上進行效能調校
  • 複雜動畫的自訂功能有限
  • 不太適合簡單的靜態導航
  • 需要理解Flutter動畫原理
  • 最適合具有3-5個標籤頁的應用程式

原始 README

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

Rolling Bottom Bar

This packages, based on this demo by Kabo showing a bottom bar with a dynamic ball indicator.

New Features 💥
  • Capability to avoid the bottom bar shadow by flat property on false
  • Setting active color by each item define on color property of RollingBottomBarItem widget

Demo

Instalation

Include rolling_bottom_bar in your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
  rolling_bottom_bar: version

Usage

To use this package, just import it into your file, build your bottom bar together with a PageView and enjoy it.

import 'package:rolling_bottom_bar/rolling_bottom_bar.dart';
import 'package:rolling_bottom_bar/rolling_bottom_bar_item.dart';

...

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Rolling Bottom Bar'),
      ),
      body: PageView(
        controller: _controller,
        children: <Widget>[
          ColoredBox(color: Colors.blueGrey.shade100),
          ColoredBox(color: Colors.redAccent),
          ColoredBox(color: Colors.greenAccent),
          ColoredBox(color: Colors.yellowAccent),
        ],
      ),
      extendBody: true,
      bottomNavigationBar: RollingBottomBar(
        controller: _controller,
        items: [
          RollingBottomBarItem(Icons.home, label: 'Page 1'),
          RollingBottomBarItem(Icons.star, label: 'Page 2'),
          RollingBottomBarItem(Icons.person, label: 'Page 3'),
          RollingBottomBarItem(Icons.access_alarm, label: 'Page 4'),
        ],
        activeItemColor: Colors.green.shade700,
        enableIconRotation: true,
        onTap: (index) {
          _controller.animateToPage(
            index,
            duration: const Duration(milliseconds: 400),
            curve: Curves.easeOut,
          );
        },
      ),
    );
  }
}

...

Options for Rolling Bottom Bar Item use

Name Description Required Default
iconData IconData to use as item icon True
label String to use as label item False
activeColor Color to use when icon is active. Only works with useActiveColorByDefault property of RollingBottomBarItem set on true False Colors.green

Options for Rolling Bottom Bar use

Name Description Required Default
controller PageView controller to use to move between pages True
items List of RollingBottomBarItem to render into bottom bar True
onTap Function triggered when an item is tapped True
color Color value to use as background False Colors.white
itemColor Color value to use with inactive items False Colors.grey[700]
activeItemColor Color value to use with active items False Colors.green
enableIconRotation Boolean value to indicate when rotation effect is triggered False false
flat Boolean value to indicate if the bottom bar has shadow or not False false
useActiveColorByDefault Boolean value to indicate when to use individual active color for each child False true

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。