autoContextDisposeFn function
- @Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
- VoidCallback fn
Schedules a function to be called automatically when 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.')
VoidCallback autoContextDisposeFn(VoidCallback fn) {
useState().disposesStore.add(fn);
return fn;
}