{"id":13550467,"url":"https://github.com/letsar/gap","last_synced_at":"2025-04-05T21:07:25.380Z","repository":{"id":45087186,"uuid":"261381655","full_name":"letsar/gap","owner":"letsar","description":"Flutter widgets for easily adding gaps inside Flex widgets such as Columns and Rows or scrolling views","archived":false,"fork":false,"pushed_at":"2023-11-09T20:10:05.000Z","size":103,"stargazers_count":213,"open_issues_count":18,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T19:06:41.170Z","etag":null,"topics":["flutter","flutter-package","flutter-ui","flutter-widget"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/letsar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"letsar","patreon":"romainrastel","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/romainrastel","paypal.me/RomainRastel"]}},"created_at":"2020-05-05T06:46:58.000Z","updated_at":"2025-03-19T07:02:35.000Z","dependencies_parsed_at":"2024-03-16T22:59:06.196Z","dependency_job_id":"8a70631a-e79f-4cad-81ce-78793e396b7c","html_url":"https://github.com/letsar/gap","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsar%2Fgap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsar%2Fgap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsar%2Fgap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsar%2Fgap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsar","download_url":"https://codeload.github.com/letsar/gap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"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","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":["flutter","flutter-package","flutter-ui","flutter-widget"],"created_at":"2024-08-01T12:01:33.482Z","updated_at":"2025-04-05T21:07:25.357Z","avatar_url":"https://github.com/letsar.png","language":"Dart","funding_links":["https://github.com/sponsors/letsar","https://patreon.com/romainrastel","https://www.buymeacoffee.com/romainrastel","paypal.me/RomainRastel"],"categories":["Dart"],"sub_categories":[],"readme":"# Gap\nFlutter widgets for easily adding gaps inside Flex widgets such as Columns and Rows or scrolling views.\n\n[![Pub](https://img.shields.io/pub/v/gap.svg)](https://pub.dartlang.org/packages/gap)\n\n### Introduction\n\nWhen it comes to add empty space between widgets inside a `Column` or a `Row`, we have multiple options:\n- We can either add a `Padding` around these widgets but it's very verbose\n- Or we can add `SizedBox` widgets between them.\n\n`Gap` is another option. It's like `SizedBox` but you don't have to know if it's inside a `Row` or a `Column`. So that it's less verbose than using a `SizedBox`.\n\n## Getting started\n\nIn your library add the following import:\n\n```dart\nimport 'package:gap/gap.dart';\n```\n\nThen you just have to add a `Gap` inside a `Column` or a `Row` with the specified extent.\n\n```dart\nreturn Column(\n  children: \u003cWidget\u003e[\n    Container(color: Colors.red, height: 20),\n    const Gap(20), // Adds an empty space of 20 pixels.\n    Container(color: Colors.red, height: 20),\n  ],\n);\n```\n\nThe `Gap` widget also works inside `Scrollable` widgets such as `ListViews`. In these cases, it will occupy the space in the same direction as the `Scrollable`.\n\n### MaxGap\n\nThis package also comes with a `MaxGap` widget.\nThe `MaxGap` widget will try to fill the available space in a `Column` or a `Row` with the specified size. If the available space\nis lesser than the specified size, the `MaxGap` widget will only take the available space.\n\nIt's useful when you want to have a gap that shrinks to avoid an overflow otherwise.\n\n\n### Other parameters\n\nBy default a `Gap` will have no extent in the opposite direction of the `Flex` parent.\nIf you want the `Gap` to have a color, you'll have to set the `color` and the `crossAxisExtent` parameters.\nYou can also use the `Gap.expand` constructor to expand the `Gap` in the opposite direction of the `Flex` parent.\n\n### SliverGap\n\nThere is also a Sliver version of the `Gap` widget:\n\n```dart\nreturn CustomScrollView(\n  slivers: \u003cWidget\u003e[\n    const SliverGap(20), // Adds an empty space of 20 pixels.\n  ],\n);\n```\n\n## Changelog\n\nPlease see the [Changelog](https://github.com/letsar/gap/blob/master/CHANGELOG.md) page to know what's recently changed.\n\n## Contributions\n\nFeel free to contribute to this project.\n\nIf you find a bug or want a feature, but don't know how to fix/implement it, please fill an [issue](https://github.com/letsar/gap/issues).  \nIf you fixed a bug or implemented a feature, please send a [pull request](https://github.com/letsar/gap/pulls).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsar%2Fgap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsar%2Fgap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsar%2Fgap/lists"}