onPressed property

void Function(bool isON)? onPressed
final

You can do what you want after pressed.

Implementation

final void Function(bool isON)? onPressed;