Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 553 Bytes

useMount.md

File metadata and controls

25 lines (18 loc) · 553 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: ^0.0.2

Usage

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

    return Container();
  }
}