{"id":13790085,"url":"https://github.com/letsar/overflow_view","last_synced_at":"2025-04-13T11:48:15.476Z","repository":{"id":37043374,"uuid":"291345615","full_name":"letsar/overflow_view","owner":"letsar","description":"A widget displaying children in a line until there is not enough space and showing a the number of children not rendered.","archived":false,"fork":false,"pushed_at":"2024-10-14T13:56:03.000Z","size":10200,"stargazers_count":179,"open_issues_count":5,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-04T05:47:51.277Z","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":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}},"created_at":"2020-08-29T20:39:28.000Z","updated_at":"2025-03-13T17:12:23.000Z","dependencies_parsed_at":"2024-12-13T17:09:08.230Z","dependency_job_id":"82b94e7f-ef80-42ed-935e-497bc6bb0767","html_url":"https://github.com/letsar/overflow_view","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsar%2Foverflow_view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsar%2Foverflow_view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsar%2Foverflow_view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsar%2Foverflow_view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsar","download_url":"https://codeload.github.com/letsar/overflow_view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710410,"owners_count":21149186,"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-03T22:00:36.822Z","updated_at":"2025-04-13T11:48:15.454Z","avatar_url":"https://github.com/letsar.png","language":"Dart","readme":"# overflow_view\nA widget displaying children in a line with an overflow indicator at the end if there is not enough space.\n\n[![Pub](https://img.shields.io/pub/v/overflow_view.svg)][pub]\n\n## Features\n* Renders children horizontally or vertically.\n* Has an overflow indicator builder so that you can display a widget showing the number of elements not rendered.\n* Can either constrain the children to the size of the first child or let them have the size they want.\n* Children can overlap each other by setting a negative spacing.\n\n![Overview][overview]\n\n## Getting started\n\nIn the `pubspec.yaml` of your flutter project, add the following dependency:\n\n```yaml\ndependencies:\n  ...\n  overflow_view:\n```\n\nIn your library add the following import:\n\n```dart\nimport 'package:overflow_view/overflow_view.dart';\n```\n\n## Usage\n\n```dart\nOverflowView(\n  // Either layout the children horizontally (the default)\n  // or vertically.\n  direction: Axis.horizontal,\n  // The amount of space between children.\n  spacing: 4,\n  // The widgets to display until there is not enough space.\n  children: \u003cWidget\u003e[\n    for (int i = 0; i \u003c _counter; i++)\n      AvatarWidget(\n        text: avatars[i].initials,\n        color: avatars[i].color,\n      )\n  ],\n  // The overview indicator showed if there is not enough space for\n  // all chidren.\n  builder: (context, remaining) {\n    // You can return any widget here.\n    // You can either show a +n widget or a more complex widget\n    // which can show a thumbnail of not rendered widgets.\n    return AvatarWidget(\n      text: '+$remaining',\n      color: Colors.red,\n    );\n  },\n)\n```\n\n### Constructors\n\nThere are two constuctors depending on what you want to do.\n\nThe `OverflowView` constructor will constrain all children to have the same size as the first one. This can be used for an avatar list for example.\n\nThe `OverflowView.flexible` constructor will let all children to determine their own size. This is less performant than the default one, but it's more flexible. This can be used for a menu bar for example.\n\n## Sponsoring\n\nI'm working on my packages on my free-time, but I don't have as much time as I would. If this package or any other package I created is helping you, please consider to sponsor me. By doing so, I will prioritize your issues or your pull-requests before the others. \n\n## Changelog\n\nPlease see the [Changelog][changelog] 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][issue].  \nIf you fixed a bug or implemented a feature, please send a [pull request][pr].\n\n\u003c!--Links--\u003e\n[pub]: https://pub.dartlang.org/packages/overflow_view\n[changelog]: https://github.com/letsar/overflow_view/blob/master/CHANGELOG.md\n[issue]: https://github.com/letsar/overflow_view/issues\n[pr]: https://github.com/letsar/overflow_view/pulls\n[overview]: https://raw.githubusercontent.com/letsar/overflow_view/master/packages/images/overflow_view.gif","funding_links":[],"categories":["Packages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsar%2Foverflow_view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsar%2Foverflow_view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsar%2Foverflow_view/lists"}