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