パッケージ、リポジトリ、アプリカテゴリを検索

vertical_scrollable_tabview のカバー
パッケージ詳細v0.1.2

vertical_scrollable_tabview

ScrollView とカスタムタブビューを同期するためのFlutterウィジェット。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1210
いいね数
105
Pub ポイント
150

パッケージをインストール

flutter pub add vertical_scrollable_tabview

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

垂直スクロールビューとカスタムタブビューを同期するFlutterウィジェットで、スムーズなスクロールとタブナビゲーションを実現します。ユーザーは垂直方向にスワイプしてコンテンツを移動しながら、対応するタブインジケーターが動的に更新されます。タブベースの整理と連続スクロールが必要なコンテンツ豊富なインターフェースに最適です。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなどすべての主要プラットフォームをサポートしており、クロスプラットフォームアプリケーションに非常に便利です。

用途

  • コンテンツが豊富なダッシュボード
  • タブ付きの垂直ナビゲーション
  • タブインジケーター付きスクロールリスト
  • モバイルおよびウェブアプリのレイアウト
  • ダイナミックタブの同期

主な機能

  • 同期スクロールとタブ選択
  • カスタマイズ可能なタブの外観
  • クロスプラットフォーム互換性
  • スムーズなスクロール体験
  • 複数のプラットフォームをサポートしています

適している対象

  • タブ付き垂直インターフェースを構築する開発者
  • 同期スクロールとタブナビゲーションを必要とするアプリ
  • クロスプラットフォーム Flutter プロジェクト
  • 広範な垂直コンテンツを備えた UI

注意事項

  • カスタムデザインには追加のスタイル設定が必要になる場合があります
  • 非常に大きなデータセットを使用した際のパフォーマンスへの影響
  • 垂直スクロールのみに制限
  • スクロール位置の状態を慎重に扱く必要がある
  • 水平タブレイアウトには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

vertical_scrollable_tabview

A Flutter widget which synchronize a ScrollView and a custom tab view.

The main idea is to create a custom tab view synchronizing with inner ScrollView. The scroll activity will trigger custom tab view at the top to follow the index of the inner scroll view widget.

exposes Scrollbar and CustomScrollView parameters to VerticalScrollableTabView

Demo

Installation

Add dependency for package on your pubspec.yaml:

dependencies:
    vertical_scrollable_tabview: <latest>
    scroll_to_index: <latest>

Usage

To use this widget we must first define how our tabs will look like.

VerticalScrollableTabView

you need to implement TabController and AutoScrollController

Import Parameter :point_down:
Parameter Definition
autoScrollController Scrollbar's controller and CustomScrollView's controller.
tabController Trailing widget for a tab, typically an TabController.
listItemData It must be List< dynamic > Type
eachItemChild A item child that in ListView.Builder, First parameter is an object that you put in listItemData, Second parameter is the index in ListView.Builder
verticalScrollPosition A Item Position
TabBar A TabBar, That required in slivers[SliverAppbar(bottom:TabBar())]
Copy parameters from Scrollbar
Parameter Definition ( parameter from Scrollbar )
scrollbarThumbVisibility thumbVisibility
scrollbarTrackVisibility trackVisibility
scrollbarThickness thickness
scrollbarRadius radius
scrollbarNotificationPredicate notificationPredicate
scrollInteractive interactive
scrollbarOrientation scrollbarOrientation
Copy parameters from CustomScrollView
Parameter Definition ( parameter from CustomScrollView )
scrollDirection scrollDirection
reverse reverse
primary primary
physics physics
scrollBehavior scrollBehavior
shrinkWrap shrinkWrap
center center
anchor anchor
cacheExtent cacheExtent
slivers slivers
semanticChildCount semanticChildCount
dragStartBehavior dragStartBehavior
keyboardDismissBehavior keyboardDismissBehavior
restorationId restorationId
clipBehavior clipBehavior

Example

** IMPORTANT** DON'T FORGET IMPLEMENT TabController and AutoScrollController

import 'package:vertical_scrollable_tabview/vertical_scrollable_tabview.dart';
VerticalScrollableTabView(
    autoScrollController: autoScrollController,          <- Required AutoScrollController
    tabController: tabController,                        <- Required TabBarController
    listItemData: data,<- Required List<dynamic>
    verticalScrollPosition: VerticalScrollPosition.begin,
    eachItemChild: (object, index) =>
        CategorySection(category: object as Category),    <- Object and index
    slivers: [                                            <- Required slivers 
      SliverAppBar(                                       <- Required SliverAppBar 
        bottom: TabBar(
          isScrollable: true,
          controller: tabController,
          indicatorPadding: const EdgeInsets.symmetric(horizontal: 16.0),
          indicatorColor: Colors.cyan,
          labelColor: Colors.cyan,
          unselectedLabelColor: Colors.white,
          indicatorWeight: 3.0,
          tabs: data.map((e) {
            return Tab(text: e.title);
          }).toList(),
          onTap: (index) {
            VerticalScrollableTabBarStatus.setIndex(index);  <- Required
          },
        ),
      ),
    ],
  ),

for full example, please see this Demo.

Contribution

Contributions are accepted via pull requests. For more information about how to contribute to this package, please check the contribution guide.

License

This project is licensed under the MIT license, additional knowledge about the license can be found here.

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。