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

パッケージ詳細v1.0.9

flutter_super_grid

グリッドビューを備えたFlutterパッケージ:基本的なグリッド用のSimpleGridView、高度なオプション用のFlatGridView、セクション付きグリッドおよび追加のスタイル用のSectionGridView。

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

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

flutter pub add flutter_super_grid

パッケージ概要

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

Flutter Super Grid は、Flutter アプリ向けに複数のグリッドビュー実装を提供する汎用パッケージです。シンプルなレイアウトには SimpleGridView、カスタマイズ性と高度な機能には FlatGridView、セクションにコンテンツを整理し追加のスタイルオプションを提供するには SectionGridView を含んでいます。クロスプラットフォーム対応で、Android、iOS、Web、macOS、Windows、Linux をサポートしています。複雑なグリッド構造を簡素化しつつ、デバイス間で柔軟性とパフォーマンスを維持します。

用途

  • 応答性のある製品グリッドの構築
  • 見出しを含むセクション付きリストの作成
  • カスタマイズ可能なダッシュボードレイアウトの設計
  • ダイナミックグリッドインターフェースの実装
  • グループ化されたメディアコレクションの表示
  • スタイリッシュなグリッドセクションでUIを強化

主な機能

  • 複数のグリッドタイプ:シンプル、フラット、セクション付き
  • 高度なカスタマイズオプション
  • セクションヘッダーおよびスタイルのサポート
  • クロスプラットフォーム互換性
  • 軽量でパフォーマンスに優れる
  • pub add を通じた簡単な統合

適している対象

  • 柔軟なグリッドレイアウトを必要とする開発者
  • カテゴリ化またはグループ化されたコンテンツを持つアプリ
  • 視覚的な整理が必要なUI中心のアプリケーション
  • 複数のプラットフォームをターゲットにするプロジェクト
  • コードのシンプルさと再利用性を重視するチーム

注意事項

  • Flutter レイアウトの原則について理解が必要
  • 複雑なデザインには追加のスタイルが必要になる場合があります
  • 基本的な使用法以外のドキュメントは限られている
  • 静的または準動的データ構造に最適
  • 高度にインタラクティブまたはアニメーション付きのグリッドには向かない

元の README

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

Flutter Super Grid

Pub

A customizable Flutter package for displaying grid views of sections.

Example App

Installation

Add the following to your pubspec.yaml file:

dependencies:
  flutter_super_grid: ^1.0.9

Then, run:

$ flutter pub get
Features
  • Customizable grid view with sections and various configuration options.
  • Support for item tap callbacks with section and item indices.
  • Option to invert the row and display the grid horizontally.
  • Section titles with customizable styling and alignment.

SectionGridView

Example SectionGrid

Usage
import 'package:flutter_super_grid/flutter_super_grid.dart';

SectionGridView(
  sections: yourSectionsList,
  renderItem: (itemData) {
    // Customize how each item is rendered
    return YourCustomItemWidget(itemData);
  },
  itemsPerRow: 3,
  // ... (See Configuration Table below)
)

FlatGridView

Example FlatGrid

Usage
import 'package:flutter_super_grid/flutter_super_grid.dart';

FlatGridView(
  data: yourDataList,
  renderItem: (itemData) {
    // Customize how each item is rendered
    return YourCustomItemWidget(itemData);
  },
  itemsPerRow: 3,
  // ... (See Configuration Table below)
)

SimpleGridView

Example SimpleGrid

Usage
import 'package:flutter_super_grid/flutter_super_grid.dart';

SimpleGridView(
  data: yourDataList,
  renderItem: (itemData) {
    // Customize how each item is rendered
    return YourCustomItemWidget(itemData);
  },
  // ... (See Configuration Table below)
)

Configuration Table

Configuration Type Default Value Description
data List - The data to display in the grid (SimpleGridView and FlatGridView).
sections List - The sections to display in the grid (SectionGridView only).
renderItem Function - Function that renders each item in the grid.
onNewItemAdded Function or null null Callback when a new item is added (SectionGridView and FlatGridView).
onPressed Function or null null Callback when an item is pressed (SectionGridView and FlatGridView).
itemsPerRow int 0 Number of items per row or column (applies when isFixed is false).
itemSize double 120.0 The size of items in the main axis.
minItemDimension double 120.0 Minimum dimension (width or height) of each grid item (applies when isFixed is false).
verticalSpacing double 10 Vertical spacing between items.
horizontalSpacing double 10 Horizontal spacing between items.
isFixed bool false Whether the grid item size is fixed.
horizontal bool false Whether the grid view is horizontal.
invertedRow bool false Whether to invert the row.
adjustGridToStyles bool false Whether to adjust the grid to styles.
style SectionGridViewStyle - Style configuration for the grid view.
itemContainerStyle ContainerStyle ContainerStyle() Style for the container of each item (FlatGridView only) (applies when isFixed is false).
footerWidget Widget SizedBox Widget to be displayed as a footer (SectionGridView and FlatGridView).
gridViewHeight double 300 Height of the gridview.
gridViewWidth double double.infinity Width of the gridview.
containerWidth double double.infinity Width of the main container (applies when it's greater than gridViewWidth).
containerHeight double 300 Height of the main container (applies when it's greater than gridViewHeight).
physics ScrollPhysics or null null The physics of the scroll view.

Documentation

For detailed documentation, see API Documentation.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Issues and Contributions

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.

If you fixed a bug or implemented a feature, please send a pull request.

カテゴリー

ソースリポジトリ

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

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