solidart_hooks 3.1.1 copy "solidart_hooks: ^3.1.1" to clipboard
solidart_hooks: ^3.1.1 copied to clipboard

Flutter Hooks bindings for Solidart, suitable for ephemeral state and for writing less boilerplate.

3.1.1 #

Changes from solidart #

  • FIX: Expose until method for Computed.

3.1.0 #

Changes from solidart #

  • REFACTOR: Deprecate maybeOn and on methods of ResourceState. Use maybeWhen and when instead.

3.0.0 #

  • BREAKING CHANGE: SignalHook no longer calls setState to trigger a rebuild when the signal changes. Instead, you should use SignalBuilder to listen to signal changes and rebuild the UI accordingly. This change improves performance and reduces unnecessary rebuilds. You can also use useListenable if you want to trigger a rebuild on signal changes.

    Migration Guide #

    Before (v2.x):

    final count = useSignal(0);
    return Text('Count: ${count.value}'); // Auto-rebuilds
    

    After (v3.x):

    final count = useSignal(0);
    return SignalBuilder(
      builder: (context, child) => Text('Count: ${count.value}'),
    );
    

    Or use useListenable for full widget rebuild:

    final count = useSignal(0);
    useListenable(count);
    return Text('Count: ${count.value}');
    

    This is inline with the behaviour of useValueNotifier from flutter_hooks.

2.0.0 #

  • FEAT: Added useResource, useResourceStream, useListSignal, useSetSignal and useMapSignal hooks.
  • CHORE: Export flutter_solidart package.

1.0.0+1 #

  • CHORE: Move example to packages/solidart_hooks/example to be compatible with pub.flutter-io.cn requirements.

1.0.0 #

  • Initial release of solidart Hooks.
1
likes
160
points
197
downloads

Publisher

verified publishermariuti.com

Weekly Downloads

Flutter Hooks bindings for Solidart, suitable for ephemeral state and for writing less boilerplate.

Repository (GitHub)
View/report issues

Topics

#state-management #signals #hooks

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, flutter_hooks, flutter_solidart

More

Packages that depend on solidart_hooks