CheckboxListTile.adaptive constructor
- Key? key,
- required bool? value,
- required ValueChanged<
bool?> ? onChanged, - MouseCursor? mouseCursor,
- Color? activeColor,
- MaterialStateProperty<
Color?> ? fillColor, - Color? checkColor,
- Color? hoverColor,
- MaterialStateProperty<
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,
- ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform,
- EdgeInsetsGeometry? contentPadding,
- bool tristate = false,
- OutlinedBorder? checkboxShape,
- Color? selectedTileColor,
- ValueChanged<
bool> ? onFocusChange, - bool? enableFeedback,
- String? checkboxSemanticLabel,
Creates a combination of a list tile and a platform adaptive checkbox.
The checkbox uses Checkbox.adaptive to show a CupertinoCheckbox for iOS platforms, or Checkbox for all others.
All other properties are the same as CheckboxListTile.
Implementation
const CheckboxListTile.adaptive({
super.key,
required this.value,
required this.onChanged,
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.controlAffinity = ListTileControlAffinity.platform,
this.contentPadding,
this.tristate = false,
this.checkboxShape,
this.selectedTileColor,
this.onFocusChange,
this.enableFeedback,
this.checkboxSemanticLabel,
}) : _checkboxType = _CheckboxType.adaptive,
assert(tristate || value != null),
assert(!isThreeLine || subtitle != null);