v0.2.1
smart_grid_view
一個響應式網格視圖,其交叉軸子項數量會根據可用的水平尺寸進行調整。
16喜歡 8近 30 天下載30Pub 分數
平台暫無資料
一個響應式網格視圖,其交叉軸子項數量會根據可用的水平尺寸進行調整。
{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
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.
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.
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'),
),
)),
),
),
);
}
}
https://raw.githubusercontent.com/ali2236/smart_grid_view/HEAD/pictures/1.jpg https://raw.githubusercontent.com/ali2236/smart_grid_view/HEAD/pictures/2.jpg