onChanged property

void Function(bool value)? onChanged
final

Called with the requested next state on activation; null disables it.

Implementation

final void Function(bool value)? onChanged;