CheckboxListTile.adaptive constructor

const CheckboxListTile.adaptive({
  1. Key? key,
  2. required bool? value,
  3. required ValueChanged<bool?>? onChanged,
  4. MouseCursor? mouseCursor,
  5. Color? activeColor,
  6. MaterialStateProperty<Color?>? fillColor,
  7. Color? checkColor,
  8. Color? hoverColor,
  9. MaterialStateProperty<Color?>? overlayColor,
  10. double? splashRadius,
  11. MaterialTapTargetSize? materialTapTargetSize,
  12. VisualDensity? visualDensity,
  13. FocusNode? focusNode,
  14. bool autofocus = false,
  15. ShapeBorder? shape,
  16. BorderSide? side,
  17. bool isError = false,
  18. bool? enabled,
  19. Color? tileColor,
  20. Widget? title,
  21. Widget? subtitle,
  22. bool isThreeLine = false,
  23. bool? dense,
  24. Widget? secondary,
  25. bool selected = false,
  26. ListTileControlAffinity? controlAffinity,
  27. EdgeInsetsGeometry? contentPadding,
  28. bool tristate = false,
  29. OutlinedBorder? checkboxShape,
  30. Color? selectedTileColor,
  31. ValueChanged<bool>? onFocusChange,
  32. bool? enableFeedback,
  33. String? checkboxSemanticLabel,
  34. double checkboxScaleFactor = 1.0,
  35. bool internalAddSemanticForOnTap = false,
})

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,
  this.contentPadding,
  this.tristate = false,
  this.checkboxShape,
  this.selectedTileColor,
  this.onFocusChange,
  this.enableFeedback,
  this.checkboxSemanticLabel,
  this.checkboxScaleFactor = 1.0,
  this.internalAddSemanticForOnTap = false,
}) : _checkboxType = _CheckboxType.adaptive,
     assert(tristate || value != null),
     assert(!isThreeLine || subtitle != null);