onChanged property
dynamic Function(dynamic value)?
onChanged
final
Callback function invoked when the user toggles the checkbox.
The callback receives a boolean value (true for checked, false for unchecked) whenever the user taps the checkbox to change its state.
Implementation
final Function(dynamic value)? onChanged;