onTap property

dynamic Function(bool newState)? onTap
final

Callback when tapped - implement your logic here The callback receives the new enabled state after toggle

Implementation

final Function(bool newState)? onTap;