CustomCheckboxListTile constructor
const
CustomCheckboxListTile({
- required bool? value,
- required ValueChanged<
bool?> ? onChanged, - Key? key,
- MouseCursor? mouseCursor,
- Color? activeColor,
- WidgetStateProperty<
Color?> ? fillColor, - Color? checkColor,
- Color? hoverColor,
- WidgetStateProperty<
Color?> ? overlayColor, - double? splashRadius,
- MaterialTapTargetSize? materialTapTargetSize,
- VisualDensity? visualDensity,
- FocusNode? focusNode,
- bool autofocus = false,
- ShapeBorder? shape,
- BorderSide? side,
- bool isError = false,
- bool? enabled,
- Color? tileColor,
- Widget? title,
- Widget? subtitle,
- bool isThreeLine = false,
- bool? dense,
- Widget? secondary,
- bool selected = false,
- EdgeInsetsGeometry? contentPadding,
- bool tristate = false,
- OutlinedBorder? checkboxShape,
- Color? selectedTileColor,
- ValueChanged<
bool> ? onFocusChange, - bool? enableFeedback,
- String? checkboxSemanticLabel,
- ListTileControlAffinity controlAffinity = ListTileControlAffinity.leading,
- String? titleText,
- bool? isRequired,
CheckboxListTile 自适应复选框列表项组件
Implementation
const CustomCheckboxListTile({
required this.value,
required this.onChanged,
super.key,
this.mouseCursor,
this.activeColor,
this.fillColor,
this.checkColor,
this.hoverColor,
this.overlayColor,
this.splashRadius,
this.materialTapTargetSize,
this.visualDensity,
this.focusNode,
this.autofocus = false,
this.shape,
this.side,
this.isError = false,
this.enabled,
this.tileColor,
this.title,
this.subtitle,
this.isThreeLine = false,
this.dense,
this.secondary,
this.selected = false,
this.contentPadding,
this.tristate = false,
this.checkboxShape,
this.selectedTileColor,
this.onFocusChange,
this.enableFeedback,
this.checkboxSemanticLabel,
// -------------------------------------------------------------------------------------------- > Custom
this.controlAffinity = ListTileControlAffinity.leading,
this.titleText,
this.isRequired,
}) : assert(
(title != null) != (titleText != null),
'必须设置 title 或 titleText 其中一个参数',
);