$onBeforeUnmount function
- @Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
- VoidCallback callback
Registers a callback to be called before the widget is unmounted.
Note: This is part of the deprecated defineWidget
API.
Implementation
@Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
void $onBeforeUnmount(VoidCallback callback) {
useState().onBeforeUnmount(callback);
}