SwitchTile constructor

SwitchTile({
  1. Key? key,
  2. SwitchStyle? switchStyle,
  3. ButtonStyle? buttonStyle,
  4. bool? overlayDisabled,
  5. bool? loosen = false,
  6. double? spacing,
  7. EdgeInsetsGeometry? padding,
  8. ControlAffinity? controlAffinity,
  9. ValueChanged<bool>? onChanged,
  10. bool selected = false,
  11. bool indeterminate = false,
  12. bool disabled = false,
  13. bool autofocus = false,
  14. FocusNode? focusNode,
  15. Curve? curve,
  16. Duration? duration,
  17. String? tooltip,
  18. Widget? secondary,
  19. required Widget child,
})

Create a tiled switch widget

Implementation

SwitchTile({
  Key? key,
  SwitchStyle? switchStyle,
  ButtonStyle? buttonStyle,
  bool? overlayDisabled,
  bool? loosen = false,
  double? spacing,
  EdgeInsetsGeometry? padding,
  this.controlAffinity,
  this.onChanged,
  this.selected = false,
  this.indeterminate = false,
  this.disabled = false,
  this.autofocus = false,
  this.focusNode,
  this.curve,
  this.duration,
  this.tooltip,
  this.secondary,
  required this.child,
})  : switchStyle = switchStyle?.copyWith(padding: EdgeInsets.zero),
      buttonStyle = ButtonStyle(
        foregroundLoosen: loosen,
        foregroundSpacing: spacing,
        overlayDisabled: overlayDisabled,
        padding: padding,
      ).merge(buttonStyle),
      super(key: key);