搜索插件、代码仓与 APP 分类

GitHub 代码仓wasabeef/flutter_use

flutter_use

玩 Flutter Hooks。

flutter_use 项目封面
星标
231
复刻
15
最近推送(UTC)
2025年6月29日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

flutter_use

flutter_lints
Inspired by react-use.


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.

📦 Packages

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

🚀 Installation

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

🌐 Interactive Demo Site

Try out all hooks with live examples at: https://wasabeef.github.io/flutter_use/

📚 Hooks by Category

📱 Mobile-first Hooks

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).
🎭 State Management

Core package: flutter_use

⏱️ Timing & Animation

Core package: flutter_use

🔄 Side Effects & Performance

Core package: flutter_use

🎯 UI Interactions

Core package: flutter_use

♻️ Lifecycle Management

Core package: flutter_use

🎨 Development & Debugging

Core package: flutter_use

  • useLogger — logs in console as component goes through life-cycles.
📱 Device Sensors

Package: flutter_use_sensors

Core package: flutter_use

🔋 Device Information

Package: flutter_use_battery

Package: flutter_use_geolocation

  • useGeolocation — tracks geo location and permission state of user's device. geolocator

Package: flutter_use_network_state

🎵 Media

Package: flutter_use_audio

  • useAudio — plays audio and exposes its controls. just_audio

Package: flutter_use_video

🚧 Coming Soon

  • useEvent — 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.



Daichi Furiya GitHub avatar
GitHub 作者

Daichi Furiya ↗

Google Developers Expert for Android

CyberAgent, Inc.Tokyo, Japan官方网站 ↗
语言DartRubySwiftKotlinObjective-C

分类

此仓库发布的插件

使用的依赖

依赖清单 1 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗