Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 524 Bytes

File metadata and controls

25 lines (18 loc) · 524 Bytes

useMount

Flutter lifecycle hook that calls a function after the component is mounted. Use useLifecycles if you need both a mount and unmount function.

Installation

dependencies:
  flutter_use: 

Usage

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

    return Container();
  }
}