ListTileSwitch constructor

const ListTileSwitch({
  1. Key? key,
  2. required bool value,
  3. required ValueChanged<bool> onChanged,
  4. double switchScale = 0.7,
  5. Color? switchActiveColor = Colors.blue,
  6. Color? switchInactiveColor,
  7. Widget? title,
  8. Widget? subtitle,
  9. Widget? leading,
  10. bool enabled = true,
  11. bool isThreeLine = false,
  12. SwitchType switchType = SwitchType.custom,
  13. EdgeInsetsGeometry? contentPadding,
  14. VoidCallback? onLongPress,
  15. VisualDensity? visualDensity,
  16. bool? dense = false,
  17. FocusNode? focusNode,
  18. bool autoFocus = false,
  19. bool selected = false,
  20. Color? focusColor,
  21. Color? hoverColor,
  22. MouseCursor? mouseCursor,
  23. bool? toggleSelectedOnValueChange = false,
  24. ListTileStyle listTileStyle = ListTileStyle.list,
})

Implementation

const ListTileSwitch({
  Key? key,
  required this.value,
  required this.onChanged,
  this.switchScale = 0.7,
  this.switchActiveColor = Colors.blue,
  this.switchInactiveColor,
  this.title,
  this.subtitle,
  this.leading,
  this.enabled = true,
  this.isThreeLine = false,
  this.switchType = SwitchType.custom,
  this.contentPadding,
  this.onLongPress,
  this.visualDensity,
  this.dense = false,
  this.focusNode,
  this.autoFocus = false,
  this.selected = false,
  this.focusColor,
  this.hoverColor,
  this.mouseCursor,
  this.toggleSelectedOnValueChange = false,
  this.listTileStyle = ListTileStyle.list,
})  : assert(switchScale <= 1.0),
      super(key: key);