rrousselGit / flutter_hooks

React hooks for Flutter. Hooks are a new kind of object that manages a Widget life-cycles. They are used to increase code sharing between widgets and as a complete replacement for StatefulWidget.
MIT License
3.06k stars 175 forks source link

add draggable_scrollable_controller #417

Open dickermoshe opened 4 months ago

dickermoshe commented 4 months ago

Added useDraggableScrollableController with tests

Didn't edit readme or changelog Lmk if you want the tests changed

davidmartos96 commented 4 months ago

I'd say this hook would benefit from the changes in https://github.com/rrousselGit/flutter_hooks/pull/415

Current implementation of useDraggableScrollableController is not disposing the DraggableScrollableController.

dickermoshe commented 4 months ago

@davidmartos96 Good point! I copied this from Expandable tile controller. I forgot that that isn't disposed. I'll fix later

dickermoshe commented 4 months ago

Fixed dispose issue If @rrousselGit plans on merging #415 I'll rebase and push

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.38%. Comparing base (d53783b) to head (f4f8d62).

:exclamation: Current head f4f8d62 differs from pull request most recent head 47eaa1e

Please upload reports for the commit 47eaa1e to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #417 +/- ## ========================================== + Coverage 98.36% 98.38% +0.02% ========================================== Files 21 22 +1 Lines 854 868 +14 ========================================== + Hits 840 854 +14 Misses 14 14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dickermoshe commented 4 months ago

Done