Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 411 Bytes

useUnmount.md

File metadata and controls

23 lines (17 loc) · 411 Bytes

useUnmount

Flutter lifecycle hook that calls a function when the component will unmount. Use useLifecycles if you need both a mount and unmount function.

Installation

dependencies:
  flutter_use: ^0.0.2

Usage

class Sample extends HookWidget {
  @override
  Widget build(BuildContext context) {
    useUnmount(() => debugPrint('UNMOUNTED'));

    return Container();
  }
}