/dart-helper-utils:migrate-dart-helper-utils-v5-to-v6from Dart Helper Utils
Guides upgrading dart_helper_utils from v5 to v6, covering renames (ConvertObject→Convert, toString1→Convert.string, ParsingException→ConversionException), removed features, and moved helpers.
Ships in Dart 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.
v6 is a large breaking release: all conversion logic moved to the
convert_object package (re-exported, so one DHU import still works),
several features moved to standalone packages, and many members were
renamed or removed. Source and target: any 5.x (and the same checklist
covers 4.x code, which mostly compiled unchanged under 5.x) to 6.x.
dart pub deps --style=compact | grep '^- dart_helper_utils '
(flutter pub deps in a Flutter app).
Already >= 6.0.0 means only leftover compile errors need the tables here,
not the dependency change.grep -rln "package:dart_helper_utils" lib/ test/
# v5-only symbols that will break:
grep -rnE "ConvertObject\.|ParsingException|toString1|altKeys|firstValueForKeys|firstElementForIndices|httpFormat|encodableCopy|encodedJsonString|flatJson|makeEncodable|safelyEncodedJson|DoublyLinkedList|Paginator|InfinitePaginator|AsyncPaginator|StringSimilarity|similarityTo|compareWith|DHUCountry|DHUTimezone|convertTo<" lib/ test/
# bare top-level conversion helpers (v5):
grep -rnE "(^|[^.[:alnum:]_])(toNum|toInt|toDouble|toBool|toDateTime|toUri|toList|toSet|toMap|toBigInt|toType|tryTo[A-Z][a-zA-Z]*)\(" lib/ test/
For a large codebase, delegate the sweep to a read-only search subagent and have it return the file list with per-symbol counts.
dart_helper_utils: ^6.0.2 (SDK ^3.10.0);
dart pub get. Solver conflicts usually mean an old SDK constraint or a
direct pin on pre-1.1 convert_object.ConvertObject. to Convert., toString1 to
Convert.string, bare toInt(x) to convertToInt(x),
ParsingException to ConversionException (context is e.context),
altKeys: to alternativeKeys:, firstValueForKeys to tryGetRaw,
httpFormat to httpDateFormat, encodableCopy/encodedJsonString
to toJsonSafe()/toJsonString(). Code older than 2.0 has flatJson
(now flatMap) and makeEncodable/safelyEncodedJson instead.doubly_linked_list package.similarityTo/compareWith:
string_search_algorithms package (algorithm enum renamed, e.g.
levenshteinDistance to levenshtein).obj.isInt/isDouble/isNull object getters: standard Dart checks or
tryConvertToInt(obj) != null.list.convertTo<T>(): convertToList<T>(list) (Set keeps
convertTo).firstOrNull, groupBy, mapIndexed,
whereNotNull, ... now come from the re-exported package:collection;
the same names keep working with ONE DHU import. A leftover direct
collection import is only an unnecessary_import info; remove it.
Ambiguous-extension errors come from another package or the project's
own extensions declaring the same member; disambiguate with hide or an
explicit extension override.dart analyze and iterate until clean.alternativeKeys (all typed map getters) now picks the first NON-null
value; a present-but-null key no longer short-circuits. Audit sites that
relied on the old behavior; use containsKey to distinguish absence.tryToBool returns null (not false) for unknown values; add ?? false
where a false fallback was assumed.(123) as -123), and
convert_object has no strict switch. Where v5 strictness matters, check
the input with int.tryParse/num.tryParse first.Convert.toUri always turns emails and phone numbers into mailto: and
tel: URIs. To avoid that, pass converter: (o) => Uri.parse('$o') or call
Uri.tryParse directly.toDateTime now accepts numeric epochs (seconds or milliseconds by
magnitude).percentile now takes 0-100 (v5 took 0-1): values.percentile(0.5)
must become values.percentile(50).TimeUtils.throttle signature changed from named duration:/function:
to positional (func, interval, {leading, trailing, onError}) returning a
callable ThrottledCallback with cancel/dispose.TimeUtils.runWithTimeout now completes with TimeoutException while the
task keeps running (late errors swallowed).tryRemoveWhere now takes a predicate and actually removes.setIfMissing checks key presence, not null values.getRandom on an empty iterable throws StateError; randomInRange
validates min <= max.concatWithSingleList/concatWithMultipleList return the non-empty side
when one side is empty.2.secondsDelay(), not 2.secDelay
(a v3-to-v4 change that often surfaces here).ParsingException text or inspected e.parsingInfo:
rewrite against ConversionException.context/fullReport().(x as dynamic).toInt()): greps cannot find these;
rely on the recorded test baseline.dart analyze clean, then the full test suite compared against the
pre-migration baseline.alternativeKeys, bool-parsing, and percentile
call sites (the silent behavior changes).// v5
final id = ConvertObject.toInt(json, mapKey: 'id');
final name = ConvertObject.toString1(json['name']);
final raw = json.firstValueForKeys('a', altKeys: ['b']);
final when = date.httpFormat;
final p = scores.percentile(0.9);
try { ... } on ParsingException catch (e) { log(e.parsingInfo.toString()); }
// v6
final id = Convert.toInt(json, mapKey: 'id');
final name = Convert.string(json['name']);
final raw = json.tryGetRaw('a', alternativeKeys: ['b']);
final when = date.httpDateFormat;
final p = scores.percentile(90);
try { ... } on ConversionException catch (e) { log(e.fullReport()); }
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub omar-hanafy/dart_helper_utils --plugin dart-helper-utils5 skills in this plugin
/async-with-dart-helper-utilsUse when Dart/Flutter code in a project that depends on the dart_helper_utils package needs debouncing, throttling, stream shaping, or bounded-concurrency async work - search-input debounce, rate-limited event streams, Debouncer/DebouncedCallback/Throttler lifecycle and disposal, TimeUtils.debounce/throttle/runWithTimeout, stream bufferCount/window/rateLimit/asPausable/withLatestValue/retry/replaceOnError, StreamController safeAdd/safeClose, Future minWait/timeoutOrNull, retry with exponential backoff, waitConcurrency, or mapConcurrent./migrate-dart-helper-utils-v6-to-v7Use when upgrading a project from dart_helper_utils 6.x to 7.x, or fixing analyzer errors and deprecation warnings after that bump - isAtSameDayAs/addOrSubtractMonths/tomorrow/isPresent/formatASyQQQ/enforceRtlIn/swap/find renames, String isEmptyOrNull to isBlank, Dart 3.13.5 and stringo 3 requirements, the removed Iterable.find, int statistics now returning double, mask and insert returning String?, UTC and daylight-saving changes in date helpers, isDOCX/isXLSX precision, typed Debouncer executionHistory, DebouncerState no longer being Equatable, or test values that changed because 7.0 fixed a bug.Other plugins' skills for the same job