{"id":15856765,"url":"https://github.com/ebenjs/grouped_selection","last_synced_at":"2025-09-16T15:17:52.543Z","repository":{"id":252681426,"uuid":"841128899","full_name":"ebenjs/grouped_selection","owner":"ebenjs","description":"A Flutter widget that allows grouped selection with single or multiple choices.","archived":false,"fork":false,"pushed_at":"2024-08-12T12:22:04.000Z","size":491,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-01T19:27:25.420Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ebenjs.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":"2024-08-11T18:11:47.000Z","updated_at":"2024-08-12T12:22:07.000Z","dependencies_parsed_at":"2025-02-07T12:34:31.530Z","dependency_job_id":"63ffcde8-15ba-4143-b6bb-f807e27350bb","html_url":"https://github.com/ebenjs/grouped_selection","commit_stats":null,"previous_names":["ebenjs/grouped_selection"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ebenjs/grouped_selection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebenjs%2Fgrouped_selection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebenjs%2Fgrouped_selection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebenjs%2Fgrouped_selection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebenjs%2Fgrouped_selection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebenjs","download_url":"https://codeload.github.com/ebenjs/grouped_selection/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebenjs%2Fgrouped_selection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275439929,"owners_count":25465044,"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-09-16T02:00:10.229Z","response_time":65,"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":[],"created_at":"2024-10-05T20:03:16.790Z","updated_at":"2025-09-16T15:17:52.524Z","avatar_url":"https://github.com/ebenjs.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# GroupedSelection\n\nA Flutter widget that allows grouped selection with single or multiple choices in a grid layout. It is customizable with icons and text, providing an interactive and visually appealing way to present selectable items.\n\n## Features\n\n- **Single or Multiple Selection:** Easily toggle between single or multiple item selection modes.\n- **Customizable Icons:** Add left and/or right icons to each item for better visual representation.\n- **Dynamic Grid Layout:** Specify the number of columns to control how items are arranged.\n- **Selection Change Callback:** Get notified when the selected items change, allowing you to handle the selected data.\n\n## Demo\n\n![GroupedSelection Demo](demo.gif)\n\n## Installation\n\nAdd `grouped_selection` to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  grouped_selection: ^0.1.0\n```\n\nThen run `flutter pub get` to fetch the package.\n\n## Usage\n\n### Basic Example\n\nHere’s a basic example of how to use `GroupedSelection` in your Flutter app:\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:grouped_selection/grouped_selection.dart';\n\nvoid main() {\n  runApp(const MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        appBar: AppBar(title: const Text(\"Grouped Selection Example\")),\n        body: Center(\n          child: GroupedSelection(\n            items: [\n              SelectionItem(text: 'Item 1'),\n              SelectionItem(text: 'Item 2'),\n              SelectionItem(text: 'Item 3'),\n            ],\n            columnCount: 2,\n            onSelectionChanged: (selectedItems) {\n              // Handle selection change\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n```\n\n### Customization\n\nYou can customize the widget with various parameters:\n\n```dart\nGroupedSelection(\n  items: [\n    SelectionItem(text: 'Item 1', leftIcon: Icons.star),\n    SelectionItem(text: 'Item 2', rightIcon: Icons.check),\n    SelectionItem(text: 'Item 3', leftIcon: Icons.star, rightIcon: Icons.check),\n  ],\n  columnCount: 3,\n  multiple: true,\n  onSelectionChanged: (selectedItems) {\n    // Handle multiple selection change\n    print('Selected items: $selectedItems');\n  },\n)\n```\n\n### Parameters\n\n- **items:** A list of `SelectionItem` objects, each representing an item in the selection grid.\n- **columnCount:** The number of columns in the grid. Default is `1`.\n- **multiple:** A boolean that determines if multiple items can be selected. Default is `false`.\n- **onSelectionChanged:** A callback function that is called whenever the selection changes. It provides a list of currently selected `SelectionItem` objects.\n\n### SelectionItem Class\n\nThe `SelectionItem` class is used to define the properties of each selectable item:\n\n```dart\nSelectionItem({\n  required this.text,\n  this.leftIcon,\n  this.rightIcon,\n  this.isSelected = false,\n});\n```\n\n- **text:** The label of the item.\n- **leftIcon:** An optional icon displayed on the left of the text.\n- **rightIcon:** An optional icon displayed on the right of the text (visible only when selected).\n- **isSelected:** A boolean indicating whether the item is selected. This is managed internally by the `GroupedSelection` widget.\n\n## Example\n\nYou can find a full example in the [example](example) directory.\n\n## Roadmap\n\n- [ ] Add support for custom colors.\n- [ ] Improve accessibility features.\n- [ ] Add animations for selection changes.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub if you find a bug or want to add new features.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor any questions or suggestions, feel free to contact me at [nikaboue10@gmail.com](mailto:nikaboue10@gmail.com).\n\n---\n\n### Notes:\n\n1. **License**: Make sure you include a `LICENSE` file in your repository.\n2. **Roadmap**: You can modify the roadmap to reflect actual features you're planning to implement.\n3. **Contact**: Replace the email address with your actual contact information.\n4. **Contributing**: Include a `CONTRIBUTING.md` if you have specific guidelines for contributions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febenjs%2Fgrouped_selection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febenjs%2Fgrouped_selection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febenjs%2Fgrouped_selection/lists"}