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

reorderable_staggered_scroll_view のカバー
パッケージ詳細v0.0.2

reorderable_staggered_scroll_view

再配置可能なスタガードグリッドビューを作成するためのFlutterパッケージ。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
94
いいね数
37
Pub ポイント
160

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

flutter pub add reorderable_staggered_scroll_view

パッケージ概要

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

ユーザーがスムーズなドラッグアンドドロップ操作を伴う再配置可能なスタガレッドグリッドレイアウトを作成できるFlutterパッケージです。標準的なスクロールビューの機能を拡張し、スタガレッドグリッド内のアイテムを動的に再配置できるようにします。写真ギャラリーまたはタスクリストのようなカスタマイズ可能なコンテンツ表示に最適です。このパッケージはすべての主要プラットフォームをサポートしており、既存のFlutterプロジェクトにシームレスに統合できます。

用途

  • カスタマイズ可能な写真ギャラリー
  • タスク管理インターフェース
  • 動的コンテンツの並べ替え
  • ユーザー主導のレイアウト配置
  • インタラクティブダッシュボードウィジェット

主な機能

  • ドラッグアンドドロップによる再順序付け
  • スタガードグリッドレイアウトのサポート
  • クロスプラットフォーム互換性
  • 並べ替え中のスムーズなアニメーション
  • 既存のFlutterアプリへの簡単な統合

適している対象

  • インタラクティブUIを構築する開発者
  • 動的なアイテム配置を必要とするアプリ
  • 視覚的コンテンツ構成を含むプロジェクト
  • 直感的なドラッグジェスチャーを求めるユーザー
  • 複数のプラットフォームをターゲットにするFlutter開発者

注意事項

  • アイテムキーの一意性を慎重に扱う必要があります
  • 大規模なデータセットではパフォーマンスに影響する可能性があります
  • 再配置ロジックのための適切な状態管理が必要です
  • 基本的なステガレート動作以外のカスタマイズは限られている
  • 中程度のコレクションに最適

元の README

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

reorderable_staggered_scroll_view

pub package GitHub license GitHub issues

A Flutter package for creating reorderable and draggable staggered grid and list views. This package provides a smooth and intuitive way to reorder items in both grid and list layouts, making it perfect for creating interactive and user-friendly applications.

List Demo Grid Demo
List Grid

Features

  • Reorder items with ease using drag and drop gestures.
  • Supports both staggered grid and list layouts.
  • Configurable drag-and-drop behavior.
  • Designed for a seamless user experience.

Getting Started

To use this package, add it to your pubspec.yaml file:

dependencies:
  reorderable_staggered_scroll_view: ^latest_version

Replace ^latest_version with the actual version you want to use.

Import the package in your Dart code:

import 'package:reorderable_staggered_scroll_view/reorderable_staggered_scroll_view.dart';

Usage

Grid
ReorderableStaggeredScrollView.grid(
  enable: _dragEnabled,
  padding: const EdgeInsets.all(16),
  scrollDirection: Axis.vertical,
  physics: const BouncingScrollPhysics(),
  crossAxisCount: 4,
  isLongPressDraggable: false,
  onDragEnd: (details, item) {
    print('onDragEnd: $details ${item.key}');
  },
  children: List.generate(
    10,
    (index) => ReorderableStaggeredScrollViewGridItem(
      key: ValueKey(index.toString()),
      mainAxisCellCount: 1,
      crossAxisCellCount: Random().nextInt(2) + 1,
      widget: Card(
        child: Center(child: Text('Item $index')),
      ),
    ),
  ),
);
List

For a list view of items use list constructor:

ReorderableStaggeredScrollView.list(
  ...
)
Custom

You can integrate the ReorderableStaggeredScrollView package with your custom list or grid widget by wrapping your custom list or grid widget with the necessary components.

DragNotification(
  child: ListView(
    scrollDirection: Axis.vertical,
    children: [
      DragContainer(
        scrollDirection: Axis.vertical,
        isLongPressDraggable: true,
        buildItems: (List<Widget> children) {
          return YourCustomListViewWidget(
            // Your custom list or grid widget configuration
            children: children,
          );
        },
        dataList: yourList, // Your List of ReorderableStaggeredScrollViewListItem or ReorderableStaggeredScrollViewGridItem
        items: (ReorderableStaggeredScrollViewListItem element, DraggableWidget draggableWidget) {
          // Map each item in your dataList into a draggable widget
          return Container(
            key: ValueKey(element.key.toString()),
            child: draggableWidget(element.widget),
          );
        }
      ),
    ],
  ),
);

Replace the comments with your actual widget configuration and data. This setup will allow you to use the ReorderableStaggeredScrollView package with your custom widget.

For more detailed usage instructions and configuration options, refer to the example directory in this repository.

Contributing

We welcome contributions! If you have ideas for improvements or encounter issues, please open an issue or submit a pull request.

Author

itisnajim, itisnajim@gmail.com

License

This package is licensed under the MIT License. See the LICENSE file for more details.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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

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