https://github.com/jpnurmi/item_selector
Item Selector for Flutter
https://github.com/jpnurmi/item_selector
dart flutter gridview listview selection
Last synced: 3 months ago
JSON representation
Item Selector for Flutter
- Host: GitHub
- URL: https://github.com/jpnurmi/item_selector
- Owner: jpnurmi
- License: other
- Created: 2020-05-02T13:47:36.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T13:35:37.000Z (over 1 year ago)
- Last Synced: 2025-03-25T04:35:52.769Z (4 months ago)
- Topics: dart, flutter, gridview, listview, selection
- Language: Dart
- Homepage: https://pub.dev/packages/item_selector
- Size: 521 KB
- Stars: 4
- Watchers: 1
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Item Selector for Flutter
[](https://pub.dev/packages/item_selector)
[](https://opensource.org/licenses/MIT)

[](https://codecov.io/gh/jpnurmi/item_selector)A generic [Flutter](https://flutter.dev) item selector that works with
ListView, GridView, Row, Column, or basically any parent widget that
can have indexed child widgets. It supports single-selection by tap,
and multi-selection by long-press and drag with auto-scrolling.## Preview
| ListView | GridView |
|:---:|:---:|
|  |  || Column | Custom |
|:---:|:---:|
|  |  |## Usage
To use this package, add `item_selector` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).
```dart
ItemSelectionController(
child: ListView(
children: List.generate(10, (int index) {
return ItemSelectionBuilder(
index: index,
builder: (BuildContext context, int index, bool selected) {
return Text('$index: $selected');
},
);
}),
),
)
```## Thanks
Item Selector is based on [Multi Select GridView in Flutter - by Simon Lightfoot](https://gist.github.com/slightfoot/a002dd1e031f5f012f810c6d5da14a11).