BasicCupertinoSwitch constructor
BasicCupertinoSwitch({
- Key? key,
- required bool value,
- Color? activeColor,
- Color? activeTrackColor,
- MaterialStateProperty<
Color?> ? trackColor, - MaterialStateProperty<
Color?> ? thumbColor, - ValueChanged<
bool> ? onChanged, - ValueWaitChanged<
bool> ? onWaitChanged,
Implementation
BasicCupertinoSwitch({
super.key,
required super.value,
Color? activeColor,
Color? activeTrackColor,
MaterialStateProperty<Color?>? trackColor,
MaterialStateProperty<Color?>? thumbColor,
super.onChanged,
super.onWaitChanged,
}) : super(
builder: (bool value, onChanged) => Switch.adaptive(
trackColor: trackColor,
thumbColor: thumbColor,
activeTrackColor: activeTrackColor,
activeColor: activeColor ?? GlobalConfig().currentColor,
value: value,
onChanged: onChanged));