Skip to main content

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.

Utopia Hooks logoUtopia Hooks logo

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:

SegmentDescription
Flutter hooksIf you want the search-friendly overview of hooks in Flutter
Flutter architectureIf you are choosing the shape of a Flutter codebase
React hooks in FlutterIf you are coming from React's hook model
Why utopia_hooksIf you want to understand the design decisions behind the library
BasicsIf you are new to Hooks and/or Flutter
ArchitectureIf you are an experienced developer
ExamplesIf you prefer to get a real-life overview
AI & agentsIf you write Flutter with a coding agent in the loop
utopia_hooks vs flutter_hooksIf you are a fellow flutter_hooks enjoyer looking for comparison


Crafted for you by UtopiaSoftware 👾