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<String> disableItems = const [],
- bool checkFirstElement = false,
- bool isLeading = false,
- bool isExpandableTitle = false,
- bool helperGroupTitle = true}
)
Implementation
SimpleGroupedCheckbox({
Key? key,
required this.controller,
required this.itemsTitle,
required this.values,
this.onItemSelected,
this.groupTitle,
this.groupTitleAlignment = Alignment.center,
this.groupStyle,
this.itemsSubTitle = const [],
this.disableItems = const [],
this.checkFirstElement = false,
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);