Skip to content

ToniTornado/item_selector

 
 

Repository files navigation

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.

Packages

No packages published

Languages

  • Dart 85.2%
  • CMake 9.9%
  • C++ 3.0%
  • C 1.0%
  • Swift 0.6%
  • Kotlin 0.2%
  • Objective-C 0.1%