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

パッケージ詳細v2.0.2

infinite_widgets

無限レイアウトウィジェットを使用すると、データベースやネットワーク呼び出しから簡単に無限リストまたは無限グリッドを作成できます。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
584
いいね数
19
Pub ポイント
140

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

flutter pub add infinite_widgets

パッケージ概要

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

InfiniteWidgets は、データベースやネットワークソースから段階的にデータを読み込むのに理想的な、無限スクロール可能なリストやグリッドの作成を簡素化するFlutterパッケージです。ページネーションロジックをスムーズに処理するレイアウトウィジェットを提供し、ボイラープレートコードを削減します。パフォーマンスを最適化しており、必要に応じてアイテムを効率的に読み込むため、大規模なデータセットに最適です。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど、すべての主要プラットフォームをサポートしています。

用途

  • APIから大規模なデータセットを読み込む
  • 無限スクロールフィードの作成
  • 遅延読み込みを使用した動的グリッドの構築
  • アプリケーションでページネートされたコンテンツを実装する
  • リアルタイムデータストリームの表示

主な機能

  • 効率的な遅延読み込み
  • 無限リストおよびグリッドのサポート
  • 組み込みのページネーション処理
  • クロスプラットフォーム互換性
  • 最小限のボイラープレートコード
  • スムーズなユーザー体験

適している対象

  • 大規模なデータセットを含むアプリ
  • ソーシャルメディアフィード
  • EC商品リスト
  • リアルタイムデータ表示
  • シンプルなページネーションを求める開発者

注意事項

  • 適切な状態管理が必要です
  • カスタムエラー処理が必要になる場合があります
  • 継続的なデータストリームに最適
  • 小さな静的リストには適していない
  • パフォーマンスはデータソースの効率に依存します

元の README

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

infinite_widgets

Infinite layout widgets like lists, grids...

Infinite list

InfiniteListView has same attributes as a normal flutter ListView widget.

InfiniteListView.separated(
        itemBuilder: (context, index) {
          return Text('$index', style: TextStyle(color: Colors.red, fontWeight: FontWeight.bold));
        },
        itemCount: _data.length, // Current itemCount you have
        hasNext: _data.length < 200, // let the widget know if you have more data to show or not
        nextData: this.loadNextData, // callback called when end to the list is reach and hasNext is true
        separatorBuilder: (context, index) => Divider(height: 1),
      ),
    );

You can specify the last loading row by providing loadingWidget.

You can interact with the trigger to load additional data by default it's 300 but you can override it with scrollThreshold.

Infinite grid

InfiniteGridView has same attributes as a normal flutter GridView widget.

InfiniteGridView(
        gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4),
        itemBuilder: (context, index) {
          return Text('$index', style: TextStyle(color: Colors.white));
        },
        itemCount: _data.length, // Current itemCount you have
        hasNext: _data.length < 200, // let the widget know if you have more data to show or not
        nextData: this.loadNextData, // callback called when end to the list is reach and hasNext is true
      ),
    );

You can specify the last loading row by providing loadingWidget.

You can interact with the trigger to load additional data by default it's 300 but you can override it with scrollThreshold.

カテゴリー

ソースリポジトリ

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

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