onChanged property
Called when the value of the ToggleSwitch should change.
This callback passes a new value, but doesn't update its state internally.
If this callback is null, the ToggleSwitch is disabled.
Implementation
final ValueChanged<bool>? onChanged;