SimpleGroupedCheckbox<T> constructor
SimpleGroupedCheckbox<T> ({
- Key? key,
- required GroupController controller,
- required List<
String> itemsTitle, - required List<
T> values, - OnChanged? onItemSelected,
- String? groupTitle,
- AlignmentGeometry groupTitleAlignment = Alignment.center,
- GroupStyle? groupStyle,
- List<
String> itemsSubTitle = const [], - List<
T> disableItems = const [], - bool isLeading = false,
- bool isExpandableTitle = false,
- bool helperGroupTitle = true,
Implementation
SimpleGroupedCheckbox({
Key? key,
required super.controller,
required super.itemsTitle,
required super.values,
this.onItemSelected,
this.groupTitle,
this.groupTitleAlignment = Alignment.center,
this.groupStyle,
this.itemsSubTitle = const [],
super.disableItems = const [],
this.isLeading = false,
this.isExpandableTitle = false,
this.helperGroupTitle = true,
}) : assert(values.length == itemsTitle.length),
assert(itemsSubTitle.isNotEmpty
? itemsSubTitle.length == itemsTitle.length
: true),
assert(
(groupTitle == null && !isExpandableTitle) ||
(groupTitle != null &&
groupTitle.isNotEmpty &&
isExpandableTitle ||
groupTitle != null &&
groupTitle.isNotEmpty &&
!isExpandableTitle),
"you cannot make isExpandable without textTitle"),
super(key: key);