flutter_grid_delegate_ext
flutter_grid_delegate_ext copied to clipboard
Flutter SliverGridDelegate extension
Simple SliverGridDelegate extension
Simple SliverGridDelegate extension, Height of big cell and small cell can be adjusted, BigCellHeight >= SmallCellHeight
.
Installation
Add dependency in pubspec.yaml
:
dependencies:
flutter_grid_delegate_ext: "^0.0.2"
Import in your project:
import 'package:flutter_grid_delegate_ext/flutter_grid_delegate_ext.dart';
Basic usage
Unequal cells height with first cell small
GridView.builder(
gridDelegate: XSliverGridDelegate(
crossAxisCount: 3,
smallCellExtent: 100,
bigCellExtent: 200,
mainAxisSpacing: 5,
crossAxisSpacing: 5,
isFirstCellBig: false
)
)

Unequal cells height with first cell big
GridView.builder(
gridDelegate: XSliverGridDelegate(
crossAxisCount: 3,
smallCellExtent: 100,
bigCellExtent: 200,
mainAxisSpacing: 5,
crossAxisSpacing: 5,
isFirstCellBig: true
)
)

Equal cells height
GridView.builder(
gridDelegate: XSliverGridDelegate(
crossAxisCount: 3,
smallCellExtent: 200,
bigCellExtent: 200,
mainAxisSpacing: 5,
crossAxisSpacing: 5,
)
)

Examples
example project contains demo
Bugs/Requests
Reporting issues and requests for new features are always welcome.