Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faob-dev/flutter_grid_delegate_ext
Flutter SliverGridDelegate extension
https://github.com/faob-dev/flutter_grid_delegate_ext
flutter flutter-package gridview slivergrid
Last synced: about 2 months ago
JSON representation
Flutter SliverGridDelegate extension
- Host: GitHub
- URL: https://github.com/faob-dev/flutter_grid_delegate_ext
- Owner: faob-dev
- License: mit
- Created: 2019-02-11T13:26:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T14:50:17.000Z (almost 6 years ago)
- Last Synced: 2023-08-20T21:58:35.815Z (over 1 year ago)
- Topics: flutter, flutter-package, gridview, slivergrid
- Language: Dart
- Homepage:
- Size: 262 KB
- Stars: 15
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Simple SliverGridDelegate extension
Simple SliverGridDelegate extension, Height of big cell and small cell can be adjusted, `BigCellHeight >= SmallCellHeight`.
[![pub package](https://img.shields.io/pub/v/flutter_grid_delegate_ext.svg)](https://pub.dartlang.org/packages/flutter_grid_delegate_ext)
### Installation
Add dependency in `pubspec.yaml`:
```yaml
dependencies:
flutter_grid_delegate_ext: "^0.0.2"
```Import in your project:
```dart
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](https://github.com/faob-dev/flutter_grid_delegate_ext/tree/master/example) project contains demo
### Bugs/Requests
Reporting issues and requests for new features are always welcome.