{"id":32298651,"url":"https://github.com/yudizandroidsunny/dynamic_height_list_view","last_synced_at":"2025-10-23T05:01:41.571Z","repository":{"id":246859280,"uuid":"824426412","full_name":"YudizAndroidSunny/dynamic_height_list_view","owner":"YudizAndroidSunny","description":"A Flutter package that provides dynamic height grid and list views with customizable layouts and flexible scroll behaviors. The package includes both DynamicHeightGridView and DynamicHeightListView to handle grids and lists where each item's height can vary.","archived":false,"fork":false,"pushed_at":"2024-09-09T04:37:17.000Z","size":1860,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-15T13:48:18.588Z","etag":null,"topics":["custom-layouts","dynamic-height-gridview","dynamic-height-listview","flexible-scrolling","grid-and-list-layouts","responsive-ui","variable-item-height","without-height-grid-view","without-height-list-view"],"latest_commit_sha":null,"homepage":"https://www.yudiz.com/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YudizAndroidSunny.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-05T05:44:26.000Z","updated_at":"2024-09-09T04:37:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"aab62c36-1580-4d60-8599-d0d985abb910","html_url":"https://github.com/YudizAndroidSunny/dynamic_height_list_view","commit_stats":null,"previous_names":["yudizandroidsunny/dynamic_height_list_view"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YudizAndroidSunny/dynamic_height_list_view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YudizAndroidSunny%2Fdynamic_height_list_view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YudizAndroidSunny%2Fdynamic_height_list_view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YudizAndroidSunny%2Fdynamic_height_list_view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YudizAndroidSunny%2Fdynamic_height_list_view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YudizAndroidSunny","download_url":"https://codeload.github.com/YudizAndroidSunny/dynamic_height_list_view/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YudizAndroidSunny%2Fdynamic_height_list_view/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280563530,"owners_count":26351731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-layouts","dynamic-height-gridview","dynamic-height-listview","flexible-scrolling","grid-and-list-layouts","responsive-ui","variable-item-height","without-height-grid-view","without-height-list-view"],"created_at":"2025-10-23T05:00:35.405Z","updated_at":"2025-10-23T05:01:41.564Z","avatar_url":"https://github.com/YudizAndroidSunny.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://raw.githubusercontent.com/YudizAndroidSunny/dynamic_height_list_view/main/assets/images/banner.png)\n\n[![pub package](https://img.shields.io/pub/v/dynamic_height_list_view.svg)](https://pub.dev/packages/dynamic_height_list_view)\n[![package publisher](https://img.shields.io/pub/publisher/dynamic_height_list_view.svg)](https://pub.dev/packages/dynamic_height_list_view/publisher)\n![GitHub code size](https://img.shields.io/github/languages/code-size/YudizAndroidSunny/dynamic_height_list_view)\n\nA Flutter package that provides dynamic height grid and list views with customizable layouts and flexible scroll behaviors. The package includes both DynamicHeightGridView and DynamicHeightListView to handle grids and lists where each item's height can vary.\n\n## Demo\n\n| \u003cimg src=\"https://raw.githubusercontent.com/YudizAndroidSunny/dynamic_height_list_view/version_0.0.2/assets/gif/dynamic_height_list_view.gif\" width=\"240\"/\u003e | \u003cimg src=\"https://raw.githubusercontent.com/YudizAndroidSunny/dynamic_height_list_view/version_0.0.2/assets/gif/dynamic_height_grid_view.gif\" width=\"240\"/\u003e\n|:---------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------|          \n\n## Features\n\n- \u003cb\u003eDynamic Grid View:\u003c/b\u003e Supports dynamic item heights with flexible row layouts.\n- \u003cb\u003eDynamic List View:\u003c/b\u003e Allows dynamic item heights in both horizontal and vertical scroll views.\n- \u003cb\u003eCustomizable Padding:\u003c/b\u003e You can specify padding for both the entire view and individual items.\n- \u003cb\u003eFlexible Scroll Behavior:\u003c/b\u003e Use custom scroll physics and controllers for smooth, customizable scrolling.\n\n\n## Installation\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  dynamic_height_list_view: ^0.0.2\n```\n\nThen, run:\n\n```yaml\nflutter pub get\n```\n\n## Usage\n\n### 1. DynamicHeightListView Example\n\nThis example demonstrates how to use `DynamicHeightListView` to display a list with dynamic item heights. You can customize the scroll direction and padding for each item.\n\n```dart\nimport 'package:dynamic_height_list_view/dynamic_height_view.dart';\nimport 'package:flutter/material.dart';\n\nclass ListViewExample extends StatelessWidget {\n  ListViewExample({super.key});\n\n  final List\u003cColor\u003e colors = List.generate(100, (index) =\u003e Color((index * 0xFFFFFF ~/ 100) \u003c\u003c 0).withOpacity(1.0));\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: const Text('Dynamic Height List View'),\n      ),\n      body: DynamicHeightListView\u003cint\u003e(\n        items: List.generate(10, (index) =\u003e index),\n        itemPadding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 8.0),\n        itemBuilder: (context, item) =\u003e Card(\n          child: Container(\n            height: 40,\n            width: 100,\n            color: colors[item],\n          ),\n        ),\n      ),\n    );\n  }\n}\n\n```\n### 2. DynamicHeightGridView Example\n\nHere’s how to use the `DynamicHeightGridView` to display a grid with varying item heights and customizable spacing between rows and columns.\n\n```dart\nimport 'package:dynamic_height_list_view/dynamic_height_view.dart';\nimport 'package:flutter/material.dart';\n\nclass GridViewExample extends StatelessWidget {\n  GridViewExample({super.key});\n\n  final List\u003cColor\u003e colors = List.generate(100, (index) =\u003e Color((index * 0xFFFFFF ~/ 100) \u003c\u003c 0).withOpacity(1.0));\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: const Text('Dynamic Height Grid View'),\n      ),\n      body: Padding(\n        padding: const EdgeInsets.all(8.0),\n        child: DynamicHeightGridView(\n          shrinkWrap: true,\n          itemCount: 100,\n          crossAxisCount: 3,\n          crossAxisSpacing: 10,\n          mainAxisSpacing: 10,\n          builder: (context, index) {\n            return Container(\n              height: 200,\n              color: colors[index],\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n```\n\n## Contributors ✨\n\nThanks goes to these wonderful people 💻:\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/YudizAndroidSunny\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/137782850?v=4?s=100\" width=\"100px;\" alt=\"YudizAndroidSunny\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYudizAndroidSunny\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/YudizAndroidSunny/dynamic_height_list_view/commits?author=YudizAndroidSunny\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/YudizAndroidVarshil\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/165645464?v=4?s=100\" width=\"100px;\" alt=\"YudizAndroidVarshil\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYudizAndroidVarshil\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/YudizAndroidSunny/dynamic_height_list_view/commits?author=YudizAndroidVarshil\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n## API\n\n### `DynamicHeightListView`\n\n| Property        | Type                                              | Description                                              |\n| --------------- | ------------------------------------------------- | -------------------------------------------------------- |\n| `items`         | `List\u003cT\u003e`                                         | The list of items to display.                            |\n| `itemBuilder`   | `Widget Function(BuildContext context, T item)`   | Function that builds the widgets for each list item.      |\n| `itemPadding`   | `EdgeInsets`                                      | Padding for each item.                                   |\n| `scrollDirection`| `ScrollDirection`                               | Direction of the scroll (horizontal or vertical).         |\n| `controller`    | `ScrollController?`                               | Controller for the scroll view.                          |\n| `physics`       | `ScrollPhysics?`                                  | Scroll physics for the view (e.g., `BouncingScrollPhysics`).|\n\n### `DynamicHeightGridView`\n\n| Property           | Type                                              | Description                                              |\n| ------------------ | ------------------------------------------------- | -------------------------------------------------------- |\n| `builder`          | `IndexedWidgetBuilder`                            | Function that builds the grid items.                     |\n| `itemCount`        | `int`                                             | Number of items in the grid.                             |\n| `crossAxisCount`   | `int`                                             | Number of columns in the grid.                           |\n| `crossAxisSpacing` | `double`                                          | Spacing between columns.                                 |\n| `mainAxisSpacing`  | `double`                                          | Spacing between rows.                                    |\n| `controller`       | `ScrollController?`                               | Controller for the grid's scroll view.                   |\n| `shrinkWrap`       | `bool`                                            | If true, grid will take up only as much space as needed. |\n\n## Contributions\n\nContributions are welcome! Please open an issue or submit a pull request on the [GitHub repository](https://github.com/YudizAndroidSunny/dynamic_height_list_view) if you would like to contribute to **Dynamic Height List/Grid View**.\n\n## Support\n\nIf you encounter any issues or have questions, feel free to open an issue on [GitHub](https://github.com/YudizAndroidSunny/dynamic_height_list_view/issues).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Visitors Count \n\u003cimg align=\"left\" src = \"https://profile-counter.glitch.me/dynamic_height_list_view/count.svg\" alt =\"Loading\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyudizandroidsunny%2Fdynamic_height_list_view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyudizandroidsunny%2Fdynamic_height_list_view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyudizandroidsunny%2Fdynamic_height_list_view/lists"}