Switch.adaptive constructor
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
.
The target platform is based on the current Theme: ThemeData.platform.
Implementation
const Switch.adaptive({
Key key,
@required this.value,
@required this.onChanged,
this.activeColor,
this.activeTrackColor,
this.inactiveThumbColor,
this.inactiveTrackColor,
this.activeThumbImage,
this.inactiveThumbImage,
this.materialTapTargetSize,
}) : _switchType = _SwitchType.adaptive,
super(key: key);