flutter_use
비동기 작업, 폼 관리, UI 상호작용 및 상태 관리를 위한 36개의 프로덕션 준비 완료된 훅을 포함한 필수 Flutter 훅 모음.
Flutter Hooks를 플레이하세요.
비동기 작업, 폼 관리, UI 상호작용 및 상태 관리를 위한 36개의 프로덕션 준비 완료된 훅을 포함한 필수 Flutter 훅 모음.
Flutter 애플리케이션용 오디오 재생 훅입니다. 컨트롤, 상태 관리 및 위치 추적과 함께 오디오 재생을 관리하기 위한 useAudio 훅을 제공합니다.
Flutter 애플리케이션용 배터리 모니터링 훅입니다. 플랫폼 간 실시간 배터리 수준 및 충전 상태 추적을 위한 useBattery 훅을 제공합니다.
Flutter 애플리케이션용 지오로케이션 훅. 권한 처리를 포함하여 GPS 추적, 위치 업데이트 및 위치 기반 기능을 위한 useGeolocation 훅을 제공합니다.
Flutter 애플리케이션용 네트워크 연결 훅입니다. 연결 상태, 네트워크 유형 모니터링 및 오프라인 시나리오 처리를 위한 useNetworkState 훅을 제공합니다.
Flutter 애플리케이션용 장치 센서 훅입니다. 운동 감지 및 기기 방향 추적을 위해 가속도계, 자이로스코프 및 자기계 센서 훅을 제공합니다.
Flutter 애플리케이션용 비디오 재생 훅입니다. 포괄적인 비디오 플레이어 기능과 상태 관리를 위해 useAssetVideo 및 useNetworkVideo 훅을 제공합니다.
^3.1.1아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A collection of Flutter Hooks inspired by React's react-use library. This monorepo contains multiple packages providing different categories of hooks for Flutter development.
| Package | Description | Version |
|---|---|---|
flutter_use |
Core hooks library with essential utilities | pub package |
flutter_use_audio |
Audio playback and control hooks | pub package |
flutter_use_battery |
Battery state monitoring hooks | pub package |
flutter_use_geolocation |
Location and permission hooks | pub package |
flutter_use_network_state |
Network connectivity hooks | pub package |
flutter_use_sensors |
Device sensors hooks | pub package |
flutter_use_video |
Video playbook hooks | pub package |
For the core package:
flutter pub add flutter_use
For specialized packages:
flutter pub add flutter_use_audio # Audio hooks
flutter pub add flutter_use_battery # Battery hooks
# ... and so on
Try out all hooks with live examples at: https://wasabeef.github.io/flutter_use/
Core package: flutter_use
useAsync — manages async operations with loading, data, and error states.useDebounceFn — debounces function calls for better performance.useInfiniteScroll — implements infinite scrolling with automatic loading.useForm — comprehensive form state management with validation.useKeyboard — tracks keyboard visibility and manages layouts (mobile only).Core package: flutter_use
useToggle and useBoolean — tracks state of a boolean.useCounter and useNumber — tracks state of a number.useList — tracks state of an array.useMap — tracks state of a map.useSet — tracks state of a Set.useStateList — circularly iterates over an array.useDefault — returns the default value when state is null.useLatest — returns the latest state or props.usePreviousDistinct — like usePrevious but with a predicate to determine if previous should update.useTextFormValidator — reactive form validation with real-time feedback.Core package: flutter_use
useInterval — re-builds component on a set interval using Timer.periodic.useTimeout — re-builds component after a timeout.useTimeoutFn — calls given function after a timeout.useUpdate — returns a callback, which re-builds component when called.Core package: flutter_use
useFutureRetry — useFuture with an additional retry method.useDebounce — debounces a function.useThrottle — throttles a value to update at most once per duration.useThrottleFn — throttles a function to execute at most once per duration.useError — error dispatcher.useException — exception dispatcher.Core package: flutter_use
useScroll — tracks a widget's scroll position.useScrolling — tracks whether widget is scrolling.useClickAway — triggers callback when user clicks outside target area.useCopyToClipboard — copies text to clipboard.Core package: flutter_use
useEffectOnce — a modified useEffect hook that only runs once.useLifecycles — calls mount and unmount callbacks.useMount — calls mount callbacks.useUnmount — calls unmount callbacks.useUpdateEffect — run an effect only on updates.useCustomCompareEffect — run an effect depending on deep comparison of its dependencies.useFirstMountState — check if current build is first.useBuildsCount — count component builds.Core package: flutter_use
useLogger — logs in console as component goes through life-cycles.Package: flutter_use_sensors
useAccelerometer, useUserAccelerometer, useGyroscope, and useMagnetometer — tracks accelerometer, gyroscope, and magnetometer sensors. sensors_plusCore package: flutter_use
useOrientation — tracks state of device's screen orientation.useOrientationFn — calls given function when screen orientation changes.Package: flutter_use_battery
useBattery — tracks device battery state. battery_plusPackage: flutter_use_geolocation
useGeolocation — tracks geo location and permission state of user's device. geolocatorPackage: flutter_use_network_state
useNetworkState — tracks the state of apps network connection. connectivity_plusPackage: flutter_use_audio
useAudio — plays audio and exposes its controls. just_audioPackage: flutter_use_video
useAssetVideo and useNetworkVideo — plays video, tracks its state, and exposes playback controls. video_playeruseEvent — subscribe to events.useFullscreen — display an element or video full-screen.usePageLeave — triggers when mouse leaves page boundaries.usePermission — query permission status for apps APIs.useMethods — neat alternative to useReducer.useSetState — creates setState method which works like this.setState.usePromise — resolves promise only while component is mounted.useObservable — tracks latest value of an Observable.Unlicense — public domain.