ComCheckboxListTile.adaptive constructor

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

Creates a combination of a list tile and a platform adaptive checkbox.

The checkbox uses ComCheckbox.adaptive to show a CupertinoCheckbox for iOS platforms, or ComCheckbox for all others.

All other properties are the same as ComCheckboxListTile.

Implementation

const ComCheckboxListTile.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 = const VisualDensity(horizontal: -4.0, vertical: -4.0),
  this.offset = const Offset(1, 1),
  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);