chore(deps): update dependency dart to v3.9.4 #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.7.3->3.9.4Release Notes
dart-lang/sdk (dart)
v3.9.4Compare Source
Released on: 2025-09-30
Pub
dart pub get --examplewill now resolveexample/folders in theentire workspace, not only in the root package.
This fixes dart-lang/pub#4674 that made
flutter pub getcrash if the examples had not been resolved before resolving the workspace.
v3.9.3Compare Source
Released on: 2025-09-09
Tools
Development JavaScript compiler (DDC)
static calls are deeply nested within a closure.
When present this led to builds timing out or
taking several minutes rather than several seconds.
v3.9.2Compare Source
Released on: 2025-08-27
Tools
Development JavaScript compiler (DDC)
hot reload in a web development environment.
This led to possible side effects being triggered early or
crashes during the hot reload if the getter throws an exception.
v3.9.1Compare Source
Released on: 2025-08-20
This is a patch release that:
clicking 'Clear' on the Network Screen (issue dart-lang/sdk#61187).
a large amount of literals (issue flutter/flutter#172626).
tag_pattern,where the
pubspec.lockfile would not be stable whenrunning
dart pub get(issue dart-lang/pub#4644).v3.9.0Compare Source
Released on: 2025-08-13
Language
Dart 3.9 assumes null safety when computing type promotion, reachability, and
definite assignment. This makes these features produce more accurate results for
modern Dart programs. As a result of this change, more dead_code warnings may be
produced. To take advantage of these improvements, set your package's SDK
constraint lower bound to 3.9 or greater (
sdk: '^3.9.0').Tools
Analyzer
The dart command-line tool commands that use the analysis server now run
the AOT-compiled analysis server snapshot. These include
dart analyze,dart fix, anddart language-server.There is no functional difference when using the AOT-compiled analysis server
snapshot. But various tests indicate that there is a significant speedup in
the time to analyze a project.
In case of an incompatibility with the AOT-compiled snapshot, a
--no-use-aot-snapshotflag may be passed to these commands. (Please file anissue with the appropriate project if you find that you need to use this
flag! It will be removed in the future.) This flag directs the tool to revert
to the old behavior, using the JIT-compiled analysis server snapshot. To
direct the Dart Code plugin for VS Code to pass this flag, use the
dart.analyzerAdditionalArgssetting. To direct the DartIntelliJ plugin to pass this flag, use the
dart.server.additional.argumentsregistry property, similar to these steps.
Add the
switch_on_typelint rule.Add the
unnecessary_unawaitedlint rule.Support a new annotation,
@awaitNotRequired, which is used by thediscarded_futuresandunawaited_futureslint rules.Improve the
avoid_types_as_parameter_nameslint rule to include typeparameters.
The definition of an "obvious type" is expanded for the relevant lint rules,
to include the type of a parameter.
Many small improvements to the
discarded_futuresandunawaited_futureslint rules.
The code that calculates fixes and assists has numerous performance
improvements.
A new "Remove async" assist is available.
A new "Convert to normal parameter" assist is available for field formal
parameters.
New fixes are available for the following diagnostics:
for_in_of_invalid_typeimplicit_this_reference_in_initializerprefer_foreachundefined_operatoruse_if_null_to_convert_nulls_to_boolsNumerous fixes and improvements are included in the "create method," "create
getter," "create mixin," "add super constructor," and "replace final with
var" fixes.
Dependencies listed in
dependency_overridesin apubspec.yamlfile nowhave document links to pub.dev.
Improvements to type parameters and type arguments in the LSP type hierarchy.
Folding try/catch/finally blocks is now supported for LSP clients.
Improve code completion suggestions with regards to operators, extension
members, named parameters, doc comments, patterns, collection if-elements and
for-elements, and more.
Improve syntax highlighting of escape sequences in string literals.
Add "library cycle" information to the diagnostic pages.
(Thanks @FMorschel for many of the above
enhancements!)
Dart build
dart build -f exe <target>is nowdart build cli --target=<target>. Seedart build cli --helpfor more info.Dart Development Compiler (dartdevc)
Outstanding async code now checks and cancels itself after a hot restart if
it was started in a different generation of the application before the
restart. This includes outstanding
Futures created by callingJSPromise.toDartfrom thedart:js_interopand the underlying thedart:js_utilhelperpromiseToFuture. Dart callbacks will not be run, butcallbacks on the JavaScript side will still be executed.
Fixed a soundness issue that allowed direct invocation of the value returned
from a getter without any runtime checks when the getter's return type was a
generic type argument instantiated as
dynamicorFunction.A getter defined as:
Could trigger the issue with a direct invocation:
Dart native compiler
Added cross-compilation support for
target architectures of
arm(ARM32) andriscv64(RV64GC)when the target OS is Linux.
Pub
Git dependencies can now be version-solved based on git tags.
Use a
tag_patternin the descriptor and a version constraint, and allcommits matching the pattern will be considered during resolution. For
example:
Starting from language version 3.9 the
flutterconstraint upper bound is nowrespected in your root package. For example:
Results in
dart pub getfailing if invoked with a version ofthe Flutter SDK different from
3.33.0.The upper bound of the flutter constraint is still ignored in
packages used as dependencies.
See flutter/flutter#95472 for details.
v3.8.3Compare Source
Released on: 2025-07-31
This is a patch release that:
v3.8.2Compare Source
Released on: 2025-07-16
This is a patch release that:
v3.8.1Compare Source
Released on: 2025-05-28
This is a patch release that:
async function bodies (issue #60748).
v3.8.0Compare Source
Released on: 2025-05-20
Language
Dart 3.8 adds null-aware elements to the language. To use them, set
your package's [SDK constraint][language version] lower bound to 3.8
or greater (
sdk: '^3.8.0').Null-aware elements
Null-aware elements make it easier to omit a value from a collection literal if
it's
null. The syntax works in list literals, set literals, and map literals.Within map literals, both null-aware keys and values are supported.
Here is an example a list literal written in both styles,
without using null-aware elements and using them:
To learn more about null-aware collection elements,
check out the documentation
and the feature specification.
Libraries
dart:coreIterable.withIteratorconstructor.dart:ioHttpClientBearerCredentials.Stdout.supportsAnsiEscapesandStdin.supportsAnsiEscapestoreturn
trueforTERMcontainingtmuxvalues.dart:htmldart:html, likeHtmlElement, can nolonger be extended. Long ago, to support custom elements, element classes
exposed a
.createdconstructor that adhered to the v0.5 spec of webcomponents. On this release, those constructors have been removed and with
that change, the classes can no longer be extended. In a future change, they
may be marked as interface classes as well. This is a follow up from an
earlier breaking change in 3.0.0 that removed the
registerElementAPIs. See#53264 for details.
dart:ffiArray.elementswhich exposes anIterableover theArray's content.Tools
Analyzer
enables external elements to be referenced in documentation comments without
actually importing them. See the
documentation
for details.
the suggestions are improved when completing text in a comment reference on a
documentation comment for an extension, a typedef, or a directive (an import,
an export, or a library). Additionally, instance members can now be suggested
in a documentation comment reference.
FutureBuilderwidget.ValueListenableBuilder.getter declaration.
omitting types:
omit_local_variable_types,omit_obvious_local_variable_types, andomit_obvious_property_types.invocation" error.
thisreferences in order to avoidname collisions.
in subclasses in other libraries.
showclause or removes names from ahideclause can now add or remove multiple names simultaneously, in order toresolve as many "undefined" errors as possible.
required arguments.
showorhideclauses, which are never necessary.autocompletion.
use_null_aware_elementslint rule.unnecessary_ignorelint rule.enhancements!)
Dart Development Compiler (dartdevc)
In order to align with dart2js semantics, DDC will now throw a runtime error
when a redirecting factory is torn off and one of its optional non-nullable
parameters is provided no value. The implicit null passed to the factory will
not match the non-nullable type and this will now throw.
In the future this will likely be a compile-time error and will be entirely
disallowed.
Dart to Javascript Compiler (dart2js)
Removed the
--experiment-new-rtiand--use-old-rtiflags.Dart native compiler
Added cross-compilation support for the
Linux x64 and Linux ARM64 target platforms.
Dart format
In 3.7.0, we released a largely rewritten formatter supporting a new
"tall" style. Since then, we've gotten a lot of feedback and bug
reports and made a number of fixes in response to that.
Features
Some users strongly prefer the old behavior where a trailing comma will be
preserved by the formatter and force the surrounding construct to split. That
behavior is supported again (but off by default) and can enabled by adding this
to a surrounding
analysis_options.yamlfile:This is similar to how trailing commas work in the old short style formatter
applied to code before language version 3.7.
Bug fixes
a trailing comment (issue dart-lang/dart_style#1639).
Style changes
The following style changes are language versioned and only
affect code whose [language version][] is 3.8 or later.
Dart code at 3.7 or earlier is formatted the same as it was before.
Allow more code on the same line as a named argument or
=>.Allow the target or property chain part of a split method chain on the RHS of
=,:, and=>.Allow the condition part of a split conditional expression on the RHS of
=,:, and=>.Don't indent conditional branches redundantly after
=,:, and=>.Indent conditional branches past the operators.
Block format record types in typedefs:
Eagerly split argument lists whose contents are complex enough to be easier
to read spread across multiple lines even if they would otherwise fit on a
single line.
The heuristic is that the argument list must contain at least three named
arguments, some of which are nested and some of which are not.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.