onChanged property

  1. @override
ValueChanged<bool>? onChanged
final

Callback invoked when the toggle state changes.

Called with the new boolean value whenever the user toggles the button. If null, the toggle becomes read-only (though it can still be controlled via controller if provided).

Implementation

@override
final ValueChanged<bool>? onChanged;