CustomCheckBoxGroup<T> constructor
CustomCheckBoxGroup<T> ({
- Key? key,
- bool horizontal = false,
- required List<
T> buttonValuesList, - ButtonTextStyle buttonTextStyle = const ButtonTextStyle(),
- double height = 35,
- double padding = 3,
- double spacing = 0.0,
- bool autoWidth = false,
- double width = 100,
- bool enableShape = false,
- double elevation = 0,
- double shapeRadius = 50,
- double radius = 20,
- required List<
String> buttonLables, - required void checkBoxButtonValues(
- List<
T>
- List<
- required Color selectedColor,
- Color? selectedBorderColor,
- WrapAlignment wrapAlignment = WrapAlignment.start,
- List<
T> ? defaultSelected, - required Color unSelectedColor,
- Color? unSelectedBorderColor,
- ShapeBorder? customShape,
- bool absoluteZeroSpacing = false,
- ScrollController? scrollController,
- EdgeInsetsGeometry? margin,
- bool enableButtonWrap = false,
- List<
T> disabledValues = const [], - Color? disabledColor,
spacing
Spacing between buttons
Implementation
CustomCheckBoxGroup({
super.key,
this.horizontal = false,
required this.buttonValuesList,
this.buttonTextStyle = const ButtonTextStyle(),
this.height = 35,
double padding = 3,
double spacing = 0.0,
this.autoWidth = false,
this.width = 100,
this.enableShape = false,
this.elevation = 0,
this.shapeRadius = 50,
this.radius = 20,
required this.buttonLables,
required this.checkBoxButtonValues,
required this.selectedColor,
this.selectedBorderColor,
this.wrapAlignment = WrapAlignment.start,
this.defaultSelected,
required this.unSelectedColor,
this.unSelectedBorderColor,
this.customShape,
this.absoluteZeroSpacing = false,
this.scrollController,
this.margin,
this.enableButtonWrap = false,
this.disabledValues = const [],
this.disabledColor,
}) : assert(buttonLables.length == buttonValuesList.length,
"Button values list and button lables list should have same number of eliments "),
assert(buttonValuesList.toSet().length == buttonValuesList.length,
"Multiple buttons with same value cannot exist") {
if (absoluteZeroSpacing) {
this.padding = 0;
this.spacing = 0;
} else {
this.padding = padding;
this.spacing = spacing;
}
}