SwitchListTile.adaptive constructor
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);