A Flutter package that automatically adjusts the height of grid tiles based on their content, making it easy to create dynamic and responsive grid layouts. It automatically adjusts the height of each grid item based on its content.
To use this library in your code:
-
add a dependency in your
pubspec.yaml
:dependencies: auto_height_grid_view:
-
add import in your
dart
code:import 'package:auto_height_grid_view/auto_height_grid_view.dart';
AutoHeightGridView(
itemCount: 10,
crossAxisCount: 2,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(12),
shrinkWrap: true,
builder: (context, index) {
return Container(
width: double.infinity,
height: 150,
color: Colors.red,);
},
),
The auto_height_grid_view includes the following properties.
Property | Type |
---|---|
key: | key |
itemCount | int |
crossAxisCount | int |
crossAxisSpacing | int |
mainAxisSpacing | int |
rowCrossAxisAlignment | CrossAxisAlignment |
controller | ScrollController |
shrinkWrap | bool |
physics | ScrollPhysics |
padding | EdgeInsets |
builder | Function(BuildContext, int) |
I would be happy to have your contributions ๐
You are welcome to open a ticket on github if any problems arise. New ideas are always welcome.
If you fixed a bug or implemented a feature, please send a Pull Request.
Copyright ยฉ 2023 3kdveloper. Licensed under the MIT LICENSE.