ItemSelectionBuilder constructor

ItemSelectionBuilder({
  1. Key? key,
  2. required int index,
  3. ItemSelectionController? controller,
  4. required ItemSelectionWidgetBuilder builder,
})

Creates an item selection builder.

Notice that you must tell ItemSelectionBuilder the index it represents, and a builder method that is called when the selection state of that particular index changes.

Implementation

ItemSelectionBuilder({
  Key? key,
  required this.index,
  ItemSelectionController? controller,
  required ItemSelectionWidgetBuilder builder,
})  : assert(index != -1),
      _controller = controller,
      _builder = builder,
      super(key: key ?? ValueKey(index));