/flutter-helper-utils:migrate-flutter-helper-utils-v8-to-v9from Flutter Helper Utils
Guides migration of Flutter projects from flutter_helper_utils v8 (or v7) to v9, covering removed notifier utilities, renamed color APIs, navigation changes, and dart_helper_utils v6 conflicts.
Ships in Flutter Helper Utils. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Version 9 is a surface-cleanup release: notifier utilities were extracted,
deprecated aliases removed, navigation naming finalized, and the
dart_helper_utils dependency jumped to v6 (its own breaking migration).
Work through the sections in order; each has a detection grep.
>=3.11.0, Flutter >=3.41.0,
dart_helper_utils >=6.0.0 <7.0.0. A direct dependency pinning
dart_helper_utils <6 blocks resolution - upgrade it first.grep -A2 'flutter_helper_utils' pubspec.lock.
If coming from 7.x, ALSO apply the v8 hop (see step 8).dependencies:
flutter_helper_utils: ^9.2.0
flutter pub get. Solver conflicts almost always trace to a direct
dart_helper_utils or single_axis_wrap pin.
grep -rn "flutter_helper_utils/\(core\|colors\|widgets\).dart" lib/)core.dart, colors.dart, and widgets.dart were removed. Use the main
import; sugar.dart remains the opt-in shortcut surface:
import 'package:flutter_helper_utils/flutter_helper_utils.dart';
grep -rn "ValueNotifier\|Listenable" lib/ | grep -i "notifier")All notifier utilities moved to the better_value_notifier package. Add it
and import alongside:
dependencies:
better_value_notifier: ^1.0.0
import 'package:better_value_notifier/better_value_notifier.dart';
grep -rnE "\.add(Opacity|Alpha|Red|Green|Blue)\(|\.color\b" lib/)| Removed (v8) | v9 replacement |
|---|---|
color.addOpacity(0.5) | color.setOpacity(0.5) |
color.addAlpha(128) | color.setAlpha(128) |
color.addRed(255) / addGreen / addBlue | color.setRed(255) / setGreen / setBlue |
int.color | unchanged - lives in the sugar surface, which the main import re-exports |
SILENT behavior change: v9 corrected string color parsing for 4-digit and
8-digit hex and for hwb(...). #RGBA/#RRGGBBAA are now parsed in CSS
channel order (alpha LAST); 0x-prefixed strings keep Dart ARGB order
(alpha FIRST). Code that relied on the old, incorrect parsing changes
result colors without any compile error - re-verify any stored hex strings
with an alpha channel.
grep -rnE "\.p(Replacement|AndRemoveUntil|Named)|navigateTo|navigateByRouteName|dismissActivePopup" lib/)Wrappers on State and StatelessWidget were removed - all navigation is
on BuildContext now:
| Removed (v8) | v9 replacement |
|---|---|
state.navigateTo(route: r) | context.pushRoute(r) |
state.navigatePushReplacement(route: r) | context.pushReplacementRoute(r) |
state.navigateByRouteName('/x', args: a) | context.pushNamedRoute('/x', arguments: a) |
context.pReplacement(screen) | context.pushReplacementPage(screen) |
context.pAndRemoveUntil(screen, pred) | context.pushPageAndRemoveUntil(screen, pred) |
context.pNamed(name, arguments: a) | context.pushNamedRoute(name, arguments: a) |
context.pReplacementNamed(name) | context.pushReplacementNamedRoute(name) |
context.pNamedAndRemoveUntil(name, pred) | context.pushNamedRouteAndRemoveUntil(name, pred) |
context.dismissActivePopup() | context.dismissAllPopups() |
Also in 9.2: context.maybePopPage() is DEPRECATED; the alias remains
available in v10. Use context.popPage() (respects PopScope guards via maybePop)
or context.forcePopPage() (direct pop, bypasses guards).
grep -rnE "unFocus|dataWhen" lib/)context.unFocus() becomes context.unfocus() (lowercase f).snapshot.dataWhen(loading:, error:, success:) becomes snapshot.when:// Before (v8)
snapshot.dataWhen(
loading: () => const CircularProgressIndicator(),
error: (e) => Text('$e'),
success: (data) => Text('$data'),
);
// After (v9) - all five states, data param is nullable T?
snapshot.when(
none: (_) => const SizedBox.shrink(),
waiting: (_) => const CircularProgressIndicator(),
active: (_) => const CircularProgressIndicator(),
done: (data) => Text('$data'),
error: (error, stackTrace, state) => Text('$error'),
);
maybeWhen(orElse: ...) exists when only some states matter. Note: error
handling takes precedence over connection state.
grep -rn "gradientAlignment" lib/)The gradientAlignment parameter was removed. Position the gradient
through the Gradient itself (begin, end, center, radius).
SingleAxisWrap moved to the single_axis_wrap package
(renamed params: preferredDirection -> primaryDirection,
rowMainAxisAlignment -> horizontalAlignment with WrapAlignment,
etc. - full table in the repo's migration_guides.md). The
dart_helper_utils dependency also jumped to v5 there.TypedListView itemBuilder gained its current
(context, index, item) signature, and headerBuilder/footerBuilder
became direct header/footer widget slots.FHU 9.x re-exports dart_helper_utils v6. If the project uses those Dart
utilities directly (conversions, firstValueForKeys, altKeys:,
httpFormat, paginators, string casing), apply the DHU v5-to-v6 migration
too - if the dart-helper-utils plugin is installed, use its
migrate-dart-helper-utils-v5-to-v6 skill; otherwise follow
migration_guides.md in the dart_helper_utils repository.
dart pub get, then flutter analyze - every leftover v8 name surfaces
as an undefined-member error; fix using the tables above.flutter test and compare against the pre-migration baseline.PopScope-guarded back navigation.grep -rn "dart_helper_utils\|single_axis_wrap" pubspec.yaml pubspec.lock.flutter pub get;
no other state is touched until code edits begin.Full rename tables: references/v8-to-v9-api-mapping.md
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub omar-hanafy/flutter_helper_utils --plugin flutter-helper-utils6 skills in this plugin
/adaptive-ui-and-lists-with-flutter-helper-utilsUse when building responsive/adaptive Flutter layouts or list UIs with the flutter_helper_utils package - PlatformTypeProvider setup, Breakpoint detection (watchBreakpoint/readBreakpoint, mobile/tablet/desktop), BreakpointLayoutBuilder, TypedListView/TypedSliverList, buildListView on iterables, pull-to-refresh, infinite scroll (onEndReached), item spacing/separators, empty states, or scrollCacheExtent tuning./colors-with-flutter-helper-utilsUse when Flutter code parses, converts, or manipulates colors with the flutter_helper_utils package - string-to-Color parsing (hex/rgb/hsl/hwb/named CSS), opacity and channel changes (setOpacity, setAlpha), darken/lighten/shade/tint, WCAG contrast and accessibility checks, color-blindness simulation, color harmonies, toHex output, or reading Colors from JSON/Map config (toColor, tryGetColor)./migrate-flutter-helper-utils-v9-to-v10Migrate apps from flutter_helper_utils 9.x to 10.x when Material types, theme or scaffold lookups, snackbar/banner helpers, page routes, or carousel controllers still use SDK Material. Covers material_ui imports, minimum SDK and dependency constraints, and legacy compatibility bridge limits./upgrade-flutter-helper-utilsUse when bumping the flutter_helper_utils package version in a project or auditing an upgrade's impact - detecting the installed version, sequencing migration hops across v7/v8/v8.5/v9/v10, patch-level bumps, or answering "is it safe to upgrade flutter_helper_utils"./use-flutter-helper-utilsUse when writing or reviewing Flutter code that uses the flutter_helper_utils package - BuildContext theme/text/colorScheme getters, MediaQuery shortcuts (sizePx, widthPx, textScaler), navigation helpers (pushPage, popPage, forcePopPage, dismissAllPopups, routeArgs), platform detection (PlatformEnv, isMobileWeb), AsyncSnapshot.when pattern matching, focus/scaffold-messenger/directionality helpers, num/Size sugar, or deciding between the main import and sugar.dart.Other plugins' skills for the same job