FLUTTER ECOSYSTEM

jpnurmi/item_selector

Item Selector for Flutter

item_selector project cover
Stars
5
Forks
8
Last push (UTC)
Apr 10, 2024
Project status
Active
J-P Nurmi GitHub avatar
GITHUB User

J-P Nurmi ↗

Sweden
LanguagesDartCMakeC++CSwiftKotlinObjective-C

Technical topics

Packages published by this repository

Dependencies used

Dependency list 3 items
  • flutter{"sdk":"flutter"}
  • interval_tree^0.3.0
  • flutter_testDevelopment{"sdk":"flutter"}

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project README

Item Selector for Flutter

pub license: MIT build codecov

A generic Flutter 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
ListView GridView
Column Custom
Column Custom

Usage

To use this package, add item_selector as a dependency in your pubspec.yaml file.

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.