SwitchListTile.adaptive constructor

const SwitchListTile.adaptive({Key key, @required bool value, @required ValueChanged<bool> onChanged, Color activeColor, Color activeTrackColor, Color inactiveThumbColor, Color inactiveTrackColor, ImageProvider activeThumbImage, ImageProvider inactiveThumbImage, Widget title, Widget subtitle, bool isThreeLine: false, bool dense, Widget secondary, bool selected: false })

Creates the wrapped switch with Switch.adaptive.

Creates a CupertinoSwitch if the target platform is iOS, creates a material design switch otherwise.

If a CupertinoSwitch is created, the following parameters are ignored: activeTrackColor, inactiveThumbColor, inactiveTrackColor, activeThumbImage, inactiveThumbImage, materialTapTargetSize.

Implementation

const SwitchListTile.adaptive({
  Key key,
  @required this.value,
  @required this.onChanged,
  this.activeColor,
  this.activeTrackColor,
  this.inactiveThumbColor,
  this.inactiveTrackColor,
  this.activeThumbImage,
  this.inactiveThumbImage,
  this.title,
  this.subtitle,
  this.isThreeLine = false,
  this.dense,
  this.secondary,
  this.selected = false,
}) : _switchListTileType = _SwitchListTileType.adaptive,
     assert(value != null),
     assert(isThreeLine != null),
     assert(!isThreeLine || subtitle != null),
     assert(selected != null),
     super(key: key);