onCancel property

VoidCallback? onCancel
final

Callback invoked when the last listener unsubscribes.

Use this to clean up resources when no one is listening.

Implementation

final VoidCallback? onCancel;