カテゴリー・パッケージ・リポジトリを検索

GitHub リポジトリali2236/smart_grid_view

smart_grid_view

利用可能な水平サイズに基づいて、クロス軸の子要素数を変更するレスポンシブグリッドビュー。

smart_grid_view のプロジェクト画像
スター
3
フォーク
2
最終プッシュ(UTC)
2020/05/21
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

smart_grid_view

A responsive grid view that changes it's cross axis child count based on the available horizontal size.

This widget is great for creating responsive designs as the sized of tiles stays about the same across different screen sizes.

How does it work

Using the width of tiles, SmartGridview will calculate the crossAxisCount for the underlying GridView with maxWidth ~/ tileWidth.

The tileHeight is used with tileWidth to calculate gridChildRatio.

Example

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Example')),
        body: SmartGridView(
          tileWidth: 128,
          tileHeight: 168,
          children: List.generate(80, (index) => Card(
            child: GridTile(
              child: Text('tile #$index'),
            ),
          )),
        ),
      ),
    );
  }
}
Result

Ali Qanbari GitHub avatar
GitHub 作者

Ali Qanbari ↗

Flutter Developer/Software Engineer

Iran, Bushehr, Bandar Bushehr公式サイト ↗
言語DartHTMLSwiftKotlinObjective-C

カテゴリー

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 1 件

  • flutter{"sdk":"flutter"}

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗