life_hooks 0.0.4 copy "life_hooks: ^0.0.4" to clipboard
life_hooks: ^0.0.4 copied to clipboard

outdated

A small class to use flutter_hooks easier

Simplifies flutter_hook creation.

Note: This library is completely experimental and not recommended for production usage.

See example below:

SettingsState useSettingsState({
  required final ScreenLayout screenLayout,
}) =>
    use(
      LifeHook(
        debugLabel: 'SettingsState',
        state: SettingsState(
          screenLayout: screenLayout,
        ),
      ),
    );

class SettingsState extends LifeState {
  SettingsState({
    required this.screenLayout,
  });
  final ScreenLayout screenLayout;

  @override
  void initState() {}

  @override
  void dispose() {}
}
3
likes
0
points
145
downloads

Publisher

verified publisherxsoulspace.dev

Weekly Downloads

A small class to use flutter_hooks easier

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_hooks

More

Packages that depend on life_hooks