|
16 | 16 | <br /> |
17 | 17 | </div> |
18 | 18 |
|
19 | | - |
20 | 19 | <div align="center"> |
21 | 20 | <br /> |
22 | 21 | <pre>flutter pub add <a href="https://pub.dev/packages/flutter_use">flutter_use</a></pre> |
23 | 22 | <br /> |
24 | 23 | </div> |
25 | 24 |
|
26 | | - |
27 | 25 | - **Sensors** |
28 | 26 | - [`useBattery`](./docs/useBattery.md) — tracks device battery state. [](https://pub.dev/packages/battery_plus) |
29 | 27 | - [`useGeolocation`](./docs/useGeolocation.md) — tracks geo location and permission state of user's device. [](https://pub.dev/packages/geolocator) |
|
57 | 55 | - [`useLifecycles`](./docs/useLifecycles.md) — calls `mount` and `unmount` callbacks. |
58 | 56 | - [`useLogger`](./docs/useLogger.md) — logs in console as component goes through life-cycles. [![][img-demo]](https://dartpad.dev/?id=c72c9ab0fa46f93dd266f6557a29a3ed&null_safety=true) |
59 | 57 | - [`useMount`](./docs/useMount.md) — calls `mount` callbacks. [![][img-demo]](https://dartpad.dev/?id=aa25e9bc3913779fcc795bef2bdc8d39&null_safety=true) |
60 | | - - [`useUnmount`](./docs/useUnmount.md) — calls `unmount` callbacks. [![][img-demo]](https://dartpad.dev/?id=aa25e9bc3913779fcc795bef2bdc8d39&null_safety=true) |
| 58 | + - [`useUnmount`](./docs/useUnmount.md) — calls `unmount` callbacks. [![][img-demo]](https://dartpad.dev/?id=aa25e9bc3913779fcc795bef2bdc8d39&null_safety=true) |
61 | 59 | - [`useUpdateEffect`](./docs/useUpdateEffect.md) — run an `effect` only on updates. [![][img-demo]](https://dartpad.dev/?id=724fee007fe78419fde61f185b83095b&null_safety=true) |
62 | 60 | - [`useCustomCompareEffect`](./docs/useCustomCompareEffect.md) — run an `effect` depending on deep comparison of its dependencies. [![][img-demo]](https://dartpad.dev/?id=27146b5ca9189664e39ad4dfe9b08abe&null_safety=true) |
63 | 61 | <br/> |
|
68 | 66 | - [`usePreviousDistinct`](./docs/usePreviousDistinct.md) — like [`usePrevious`](https://pub.dev/documentation/flutter_hooks/latest/flutter_hooks/usePrevious.html) but with a predicate to determine if `previous` should update. [![][img-demo]](https://dartpad.dev/?id=86e0e29f8198095dbd0d68a736c671bb&null_safety=true) |
69 | 67 | - [`useStateList`](./docs/useStateList.md) — circularly iterates over an array. [![][img-demo]](https://dartpad.dev/?id=5761442418062838b04cbe21a36be586&null_safety=true) |
70 | 68 | - [`useToggle` and `useBoolean`](./docs/useToggle.md) — tracks state of a boolean. [![][img-demo]](https://dartpad.dev/?id=7e070264db2566b3c990c403dd61c3ff&null_safety=true) |
71 | | - - [`useCounter` and `useNumber`](./docs/useCounter.md) — tracks state of a number. [![][img-demo]](https://dartpad.dev/?id=5ee82acd2f1947b2d0ca02da4ab327b8&null_safety=true) |
| 69 | + - [`useCounter` and `useNumber`](./docs/useCounter.md) — tracks state of a number. [![][img-demo]](https://dartpad.dev/?id=5ee82acd2f1947b2d0ca02da4ab327b8&null_safety=true) |
72 | 70 | - [`useList`](./docs/useList.md) — tracks state of an array. [![][img-demo]](https://dartpad.dev/?id=e04b584b8ab67492a1024ea7dd9adcbb&null_safety=true) |
73 | 71 | - [`useMap`](./docs/useMap.md) — tracks state of a map. [![][img-demo]](https://dartpad.dev/?id=325b4737e78d40463fc0f3d3cc317b35&null_safety=true) |
74 | 72 | - [`useSet`](./docs/useSet.md) — tracks state of a Set. [![][img-demo]](https://dartpad.dev/?id=3d1199828a54b19c526a26a6c0021293&null_safety=true) |
|
78 | 76 | <br/> |
79 | 77 | <br/> |
80 | 78 | - <details><summary><b>TBD</b></summary><div> |
81 | | - |
| 79 | + |
82 | 80 | - `useCopyToClipboard` — copies text to clipboard. |
83 | 81 | - `useEvent` — subscribe to events. |
84 | 82 | - `useScroll` — tracks a widget's scroll position. |
|
92 | 90 | - `usePromise` — resolves promise only while component is mounted. |
93 | 91 | - `useObservable` — tracks latest value of an `Observable`. |
94 | 92 | - `useThrottle` and `useThrottleFn` — throttles a function. |
95 | | - |
96 | | -</div></details> |
97 | 93 |
|
| 94 | +</div></details> |
98 | 95 |
|
99 | 96 | <br /> |
100 | 97 | <br /> |
|
107 | 104 | <br /> |
108 | 105 | <br /> |
109 | 106 |
|
110 | | - |
111 | 107 | [img-demo]: https://img.shields.io/badge/demo-%20%20%20%F0%9F%9A%80-green.svg |
0 commit comments