搜索分类、插件与代码仓

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 ↗