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

套件詳情v0.1.1

tabbar

簡單的標籤欄,使用 PageController 重寫,並支援內部 PageView 操作

近 30 天下載
43
喜歡數
24
Pub 分數
40

安裝套件

flutter pub add tabbar

套件介紹

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

一個簡單、可自訂的標籤欄,使用 PageController 建立,以實現標籤之間的平滑導航。它簡化了內部 PageView 的管理,讓開發者能輕鬆控制標籤切換與狀態。專為 Flutter 應用中的乾淨高效標籤式 UI 設計,提供比標準標籤欄更輕量的替代方案,並具備增強的可程式化行為。非常適合需要動態標籤切換與自訂動畫的應用。

適用情境

  • 建立動態標籤介面
  • 實現可滑動的標籤導航
  • 建構自訂標籤佈局
  • 使用 PageController 管理標籤狀態
  • 啟用程式化標籤頁切換
  • 與複雜的頁面過渡整合

主要特色

  • 基於 PageController 建構,用於進階控制
  • 簡化內部 PageView 處理
  • 支援自訂標籤樣式
  • 促進平滑的標籤頁切換
  • 輕量且易於整合
  • 提供程式化標籤操作

適合對象

  • 尋求對標籤導航進行細粒度控制的開發者
  • 具有多個可滾動標籤部分的應用程式
  • 自定義選項卡 UI 實現
  • 需要可重用標籤組件的項目
  • Flutter 初學者學習 PageController 的使用
  • 需要響應式標籤行為的應用程式

使用建議

  • 不包含內建動畫預設
  • 僅限基本標籤功能,不包含其他特性
  • 需要手動狀態管理
  • 無平台特定優化
  • 不適用於巢狀標籤結構
  • 可能需要額外的樣式來實現複雜的設計

原始 README

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

tabbar

Simple tabbar, rewritten using pagecontroller and facilitating manipulation of the internal PageView. Its layout is very similar to TabBarView, as the following image:

Simple use

Controller declaration

final controller = PageController();

Header


TabbarHeader(
  controller: controller,
  tabs: [
    Tab(child: Icon(Icons.ac_unit)),
    Tab(text: "Tab 2"),
    Tab(child: Icon(Icons.access_alarm)),
  ],
),

Content

TabbarContent(
  controller: controller,
  children: <Widget>[
    Container(color: Colors.yellow),
    Container(color: Colors.red),
    Container(color: Colors.purple),
  ],
),

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。