utopia_hooks: hooks-based Flutter state management
Library
utopia_hooks is a comprehensive, flexible state management solution for Flutter apps. It is heavily inspired by React Hooks (and Flutter Hooks), but takes a more holistic approach to app architecture: local state, shared state, async work, and testable screen logic all use the same model.
Feel free to visit our pub.dev page for an additional overview.
Installation
Add utopia_hooks to your pubspec.yaml as a dependency and run flutter pub get
dependencies:
utopia_hooks: // latest version
or add the dependency through your console
flutter pub add utopia_hooks
Import
Now in your Flutter application you can use:
import 'package:utopia_hooks/utopia_hooks.dart';
AI skill (optional)
More of this code is written with a coding agent in the loop. The utopia-hooks skill teaches the agent the Screen/State/View pattern and the hook catalog up front, so it writes idiomatic utopia_hooks on the first try instead of guessing. The skill's checks run through the Utopia CLI, so activate it first, then add the marketplace and install the skill in Claude Code.
# Activate the Utopia CLI (the skill's checks run through it)
dart pub global activate utopia_cli
# In Claude Code: add the marketplace and install the skill
/plugin marketplace add Utopia-USS/utopia-flutter-skills
/plugin install utopia-hooks@utopia-flutter-skills
For the full write-up see the /utopia-hooks-skill page, or read why utopia_hooks is built for AI.
Next step
Based on your experience we recommend few different starting points:
| Segment | Description |
|---|---|
| Flutter hooks | If you want the search-friendly overview of hooks in Flutter |
| Flutter architecture | If you are choosing the shape of a Flutter codebase |
| React hooks in Flutter | If you are coming from React's hook model |
| Why utopia_hooks | If you want to understand the design decisions behind the library |
| Basics | If you are new to Hooks and/or Flutter |
| Architecture | If you are an experienced developer |
| Examples | If you prefer to get a real-life overview |
| AI & agents | If you write Flutter with a coding agent in the loop |
| utopia_hooks vs flutter_hooks | If you are a fellow flutter_hooks enjoyer looking for comparison |
Crafted for you by UtopiaSoftware 👾