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

flex_grid のカバー
パッケージ詳細v5.1.0

flex_grid

FlexGridは、表形式でデータを表示します。固定列/行、追加読み込み、高性能、およびTabBarView/PageViewでのより良い体験を備えています。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
157
いいね数
51
Pub ポイント
130

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

flutter pub add flex_grid

パッケージ概要

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

FlexGrid は、Flutter 向けの高性能テーブルウィジェットで、データを表形式で表示し、固定列・固定行、無限スクロールによる追加読み込み、および TabBarView や PageView などの動的環境での最適化レンダリングをサポートしています。大規模なデータセット向けに設計されており、モバイル、Web、デスクトップを含むすべてのプラットフォームで応答性の高いユーザー体験を実現します。効率的なレイアウト管理と視覚的な明確さを必要とするデータ重視のアプリケーションに最適です。

用途

  • テーブル形式で大規模なデータセットを表示する
  • 固定ヘッダーを持つスクロール可能なテーブルの作成
  • タブ内のページネートまたは無限リストの実装
  • 固定列を使用したデータダッシュボードの作成
  • ネストされたナビゲーションビューでのパフォーマンス最適化

主な機能

  • より良いナビゲーションのための固定列と行
  • 'もっと読み込む'機能付きの無限ロード
  • 大規模データセット向けの高パフォーマンスレンダリング
  • TabBarView/PageView とのスムーズな統合
  • クロスプラットフォーム互換性(Android、iOS、Web、macOS、Windows、Linux)

適している対象

  • データ集約型アプリ
  • 管理パネルとダッシュボード
  • 複雑なテーブルを備えたモバイルおよびウェブアプリケーション
  • 効率的なテーブルレンダリングが必要な開発者
  • ナビゲーションに TabBarView や PageView を使用するプロジェクト

注意事項

  • メモリ上の問題を避けるために、大規模なデータセットの取り扱いに注意が必要です
  • 複雑なセルレイアウトにはカスタムスタイルが必要になる場合があります
  • パフォーマンスはデータのサイズと複雑さに依存します
  • 制限された組み込み編集機能
  • 読み取り専用または簡単なインタラクションのシナリオに最適

元の README

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

flex_grid

pub package GitHub stars GitHub forks GitHub license GitHub issues FlutterCandies QQ 群

Language: English| 中文简体

The FlexGrid control provides a powerful and quickly way to display data in a tabular format. It is including that frozened column/row,loading more, high performance and better experience in TabBarView/PageView.

parameter description default
frozenedColumnsCount The count of forzened columns 0
frozenedRowsCount The count of forzened rows 0
cellBuilder The builder to create cell required
cellBuilder The builder to create header required
columnsCount The count of columns, it should big than 0 required
source The data source of [FlexGrid] required
rowWrapper decorate row widget in this call back null
rebuildCustomScrollView rebuild when source is changed, It's from [LoadingMoreCustomScrollView] false
controller The [ScrollController] on vertical direction null
horizontalController The [SyncControllerMixin] for horizontal direction null
outerHorizontalSyncController The Outer [SyncControllerMixin], for example [ExtendedTabBarView] or [ExtendedPageView]. It make better experience when scroll on horizontal direction null
physics The physics on both horizontal and vertical direction null
verticalHighPerformance/horizontalHighPerformance If true, forces the children to have the given extent(Cell height/width) in the scroll direction. false
headerStyle An immutable style describing how to create header CellStyle.header()
cellStyle An immutable style describing how to create cell CellStyle.cell()
indicatorBuilder Widget builder for different loading state, it's from [LoadingMoreCustomScrollView] null
extendedListDelegate A delegate that provides extensions, it's from [LoadingMoreCustomScrollView] null
headersBuilder The builder to custom the headers of [FlexGrid] null
link if link is true, scroll parent [ExtendedTabView] when [FlexGrid] is over scroll false

source

[FlexGrid.source] is form loading_more_list, LoadingMoreBase is data collection for loading more. override loadData method to load your data. set hasMore to false when it has no more data.

class FlexGridSource extends LoadingMoreBase<GridRow> {
  int _pageIndex = 1;

  void _load() {
    for (int i = 0; i < 15; i++) {
      add(GridRow(name: 'index:$_pageIndex-$i'));
    }
  }

  @override
  bool get hasMore => _pageIndex < 4;

  @override
  Future<bool> loadData([bool isloadMoreAction = false]) async {
    await Future<void>.delayed(const Duration(seconds: 2));
    _load();
    _pageIndex++;
    return true;
  }

  @override
  Future<bool> refresh([bool notifyStateChanged = false]) async {
    _pageIndex = 1;
    return super.refresh(notifyStateChanged);
  }
}

rowWrapper

decorate row widget in this call back.

    FlexGrid(
      rowWrapper: (
        BuildContext context,
        T data,
        int row,
        Widget child,
      ) {
        return Column(
          children: <Widget>[
            child,
            const Divider(),
          ],
        );
      },
    );

headersBuilder

you can add anyother headers in this call back.

    FlexGrid(
      headersBuilder: (BuildContext b, Widget header) {
        return <Widget>[
          header,
          SliverToBoxAdapter(
            child: PullToRefreshContainer(
                (PullToRefreshScrollNotificationInfo info) {
              return PullToRefreshHeader(
                info,
                source.lastRefreshTime,
              );
            }),
          ),
        ];
      },
    );

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

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

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