搜尋分類、套件與程式碼儲存庫

GitHub 儲存庫ali2236/smart_grid_view

smart_grid_view

一個響應式網格視圖,其交叉軸子項數量會根據可用的水平尺寸進行調整。

smart_grid_view 專案封面
星標
3
分支
2
最近推送(UTC)
2020年5月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 ↗