搜索插件、代码仓与 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.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。