Search packages, repositories and app categories

dynamic_height_grid_view cover
Package detailsv0.0.4

dynamic_height_grid_view

GridView with dynamic height. No need to specify aspectRatio to the grid.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
6K
Likes
113
Pub points
150

Install package

flutter pub add dynamic_height_grid_view

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that provides a GridView with dynamically adjustable item heights, eliminating the need to define an aspectRatio. It automatically sizes grid items based on their content, making it ideal for layouts with varying content dimensions. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux, ensuring consistent behavior across devices. It's lightweight and integrates seamlessly into existing Flutter projects.

Use cases

  • Displaying variable-height content in grids
  • Creating responsive layouts without fixed aspect ratios
  • Building dynamic photo or card galleries
  • Implementing flexible product listings
  • Designing adaptive UIs for multiple screen sizes

Key features

  • Automatic height calculation per item
  • No need to set aspectRatio
  • Cross-platform compatibility
  • Simple integration with Flutter
  • Supports scrollable and nested grids
  • Efficient rendering with minimal overhead

Suitable for

  • Developers building responsive grid layouts
  • Apps with diverse content types
  • Projects requiring flexible UI design
  • Teams prioritizing cross-platform consistency
  • Users seeking lightweight grid solutions

Considerations

  • May require careful handling of large datasets for performance
  • Not suitable for fixed-height grid designs
  • Content overflow should be managed explicitly
  • Best used with predictable content sizing
  • Limited customization compared to full custom renderers

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

dynamic_height_grid_view

pub package License: MIT

GridView with dynamic height. No need to use aspectRatio.

Usage

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: DynamicHeightGridView(
        itemCount: 120,
        crossAxisCount: 3,
        crossAxisSpacing: 10,
        mainAxisSpacing: 10,
        builder: (ctx, index) {
          /// return your widget here.
        }
      ),
    );
  }
}
  • Use SliverDynamicHeightGridView for CustomScrollView

Categories

Source repository

Projects using this package