useOnUnmount function
- VoidCallback cb
Calls a provided callback before widget is unmounted from widget tree.
useOnUnmount(() {
print('unmounted');
});
Implementation
void useOnUnmount(VoidCallback cb) {
useEffect(() => () => cb(), []);
}
Calls a provided callback before widget is unmounted from widget tree.
useOnUnmount(() {
print('unmounted');
});
void useOnUnmount(VoidCallback cb) {
useEffect(() => () => cb(), []);
}