widgetBuilder method
Implementation
@override
Widget widgetBuilder(
BuildContext context,
bool value,
bool isEnabled,
) {
return CupertinoSwitch(
value: value,
inactiveTrackColor: isEnabled ? Colors.red : Colors.grey,
onChanged: onChanged,
);
}