Skip to content

Update dependency dart to v3 - #2

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/dart-3.x
Open

Update dependency dart to v3#2
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/dart-3.x

Conversation

@renovate

@renovate renovate Bot commented Aug 27, 2023

Copy link
Copy Markdown

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Update Change
dart (source) major >=2.12.0 <3.0.03.13.0

Release Notes

dart-lang/sdk (dart)

v3.13.0

Compare Source

Released on: Unreleased

Language

Dart 3.13 adds primary constructors to the language.
To use this feature, set your package's [SDK constraint][language version] lower
bound to 3.13 or greater (sdk: '^3.13.0').

Primary constructors

The primary constructors feature is a brevity feature. There are no new
semantics, but it lets you express declarations in a less verbose way.

This feature lets you specify one constructor and a set of instance variables
in the header of a declaration.

Currently, you write a declaration with a constructor and some fields as:

// Current syntax.
class Point {
  int x;
  int y;
  Point(this.x, this.y);
}

Now you can write:

class Point(var int x, var int y);

If a primary constructor needs an initializer list, a body, or both,
you can specify them inside the class using the this body syntax:

class Point(var int x, var int y) {
  this : assert(x >= 0) {
    print('Point created at $x, $y');
  }
}

As part of this feature, you can also use the new and factory keywords to
declare constructors in the class body without repeating the class name:

class Point {
  int x, y;

  // Equivalent to `Point(this.x, this.y)`:
  new(this.x, this.y);

  // Equivalent to `Point.origin()`:
  new origin() : x = 0, y = 0;

  // Equivalent to `factory Point.clone(Point other)`:
  factory clone(Point other) => Point(other.x, other.y);
}

To learn more about the feature, check out the
feature specification.

Other changes
  • Breaking change: A minor change has been made to type promotion to avoid
    unsound behavior. See SDK issue #​62889 for details.
Libraries
dart:async
  • Added Future.pause as an alternative to Future.delayed with no callback.
dart:core
  • Added List.unmodifiableOf with better typing than List.unmodifiable.
  • Added Map.unmodifiableOf with better typing than Map.unmodifiable.
  • Added two getters on int for efficient bit-counting:
    trailingZeroBitCount (ctz) and oneBitCount (popcount). On native
    platforms they operate on the full 64-bit two's-complement
    representation; on the web they operate on the least-significant 32 bits.
    For more details, see SDK issue #​52673.
dart:io
  • The cookie-date parser now uses the correct algorithm again.
    A change to the parsing made it only accept the formats that
    cookie dates should have, but the RFC specifies a very
    permissive algorithm for what should be accepted.

  • Behavioral change: File access and modification timestamps
    (File.lastModified, FileStat, lastAccessed, lastModified,
    setLastAccessed, setLastModified) now preserve microsecond precision
    instead of truncating or rounding to millisecond accuracy. See SDK issue
    #​42444.

  • Breaking change:
    Added InterfaceAddress, a subtype of InternetAddress that exposes a
    prefixLength field and a broadcast getter for network interface addresses.
    NetworkInterface.addresses now returns List<InterfaceAddress>
    instead of List<InternetAddress>. Code that implements NetworkInterface
    and overrides addresses will need to update the return type.
    For more details, see SDK issue #​63216.

  • The InternetAddress.lookup function no longer accepts invalid
    IPv4 addresses that are traditionally accepted by inet_aton.

dart:isolate
  • Added synchronous execution and event loop control APIs to Isolate:
    Isolate.runSync, Isolate.create, Isolate.shutdownSync,
    Isolate.pinToCurrentThread, Isolate.isPinnedToCurrentThread,
    Isolate.runEventLoopSync, Isolate.onEvent, and Isolate.handleEvent.
dart:js_interop
  • JSFunction and JSExportedDartFunction are now generic.
    JSExportedDartFunction<T>.toDart now casts the original wrapped function to
    the type argument T. Calls to isA<JSExportedDartFunction<T>> now also
    check that the wrapped function is a T. Otherwise, this type argument is
    purely descriptive and intended for increased static type safety. Importantly,
    the runtime types of JSFunction and JSExportedDartFunction do not change.
    For more details, see SDK issue #​54557.
  • JSObject.getPrototypeOf is added.
Tools
Analyzer
  • Added LSP support for Inline Values (textDocument/inlineValue), allowing
    IDEs and debuggers to render inline variable evaluations during active
    debugging sessions.
  • Introduced custom LSP methods (dart/textDocument/getFlutterWidgetPreviews
    and dart/workspace/getFlutterWidgetPreviews) to serve Flutter Widget
    Preview metadata to editor clients.
  • Introduced custom LSP method dart/connectToDtd enabling language server
    clients to pair the Analysis Server with the Dart Tooling Daemon (DTD).
  • A no_raw_types lint rule is introduced, which replaces the
    strict-raw-types analysis option, offering a more consistent approach.
  • A no_dynamic_casts lint rule is introduced, which replaces the
    strict-casts analysis option, offering a more consistent approach.
  • The following lint rules have been determined to be low value, and are
    deprecated: avoid_private_typedef_functions, and one_member_abstracts.
    If there is desire to keep using these, they can be re-implemented with
    analyzer plugins.
Linter
  • Added new lint rules:
    • async_return_with_no_await: Warns on async functions returning a
      non-Future value without using await.
    • empty_container_bodies: Highlights empty bodies in classes, enums,
      mixins, or extensions.
    • initialize_in_field_declaration: Recommends initializing fields at their
      declaration site where applicable.
    • unnecessary_const_in_enum_constructor: Flags redundant const keywords
      in enum constructors.
    • unnecessary_primary_constructor_body: Flags unnecessary or empty bodies
      on primary constructors.
    • unnecessary_type_name_in_constructor: Flags redundant explicit type
      names in constructor declarations.
    • use_declaring_parameters: Encourages declaring parameters in primary
      constructors.
  • Added experimental lint rule use_primary_constructors to encourage
    adopting primary constructor syntax when Dart 3.13 primary constructor
    feature is enabled.
Formatter
  • Show the supported language versions when running
    dart format --version --verbose.
  • Don't crash if an analysis_options.yaml file has an include that points to
    a non-existent or unreadable file (dart_style #​1840).

The following minor style bug fixes are not language versioned and apply to all
formatted code:

  • Fix a bug in eager splitting optimization that in rare cases would lead to a
    collection or argument list splitting unnecessarily (dart_style #​1809).

  • Don't add a blank line before a comment at the end of a compilation unit or
    braced body (dart_style #​1644).

  • Format extension type representation clauses the same way primary constructor
    formal parameter lists are formatted.

  • When trailing commas are preserved, don't insert a newline before the ; in
    an enum with members unless there actually is a trailing comma.
    (Fix by @​Barbirosha.)

The following changes only apply when formatting code at language version 3.13
or higher:

Pub
  • Added dart pub workspace list command to list all packages in the
    workspace along with their directory paths, with support for JSON output via
    --json.
  • Added dart pub check-resolution-up-to-date internal command for fast
    timestamp-based package resolution validation without contacting remote
    servers.
  • Added dart pub cache preload command for installing packages into
    PUB_CACHE directly from .tar.gz archives.
Dart CLI
  • Added support for cross-compilation to the dart build cli command via the
    --target-os and --target-arch flags.
  • Both dart build and dart compile now support using locally-built target
    binaries from a local SDK build directory (identifiable by the presence of a
    build.ninja file), avoiding the need to download them from Google Cloud
    Storage.
Dart Runtime
  • Built-in fallback root certificates used if the system certificates cannot be
    found are no longer included. The existing --root-certs-file and
    --root-certs-cache options to the standalone VM may be used to provide
    certificates if the system certificates cannot be found.
C Embedder API
  • Breaking change: Updated Dart_FileModifiedCallback in
    runtime/include/dart_tools_api.h to pass int64_t since in microseconds
    since epoch (matching FileStat microsecond precision), updated from
    milliseconds.
  • Added Dart_SetCurrentThreadOwnsIsolate and
    Dart_GetCurrentThreadOwnsIsolate functions in runtime/include/dart_api.h
    (and dart_api_dl.h), allowing custom embedders to bind and query isolate
    thread ownership.

v3.12.2

Compare Source

Released on: 2026-06-09

This is a patch release that:

  • Fixes a crash bug in dart format if an analysis_options.yaml file has an
    include that points to a non-existent file (issue #​1840).

v3.12.1

Compare Source

Released on: 2026-05-26

This is a patch release that:

  • Fixes a bug ThreadLocal which manifests as some static fields in dart:*
    libraries being reset across suspension points, e.g. print() bypasses
    an override specified by the current Zone after suspension.
    (issue #​63408)
  • Fixes sporadic dart analyze crash on Windows ARM64, where analysis server
    crashes on shutdown trying to delete perf_witness control socket.
    (issue #​63343)

v3.12.0

Compare Source

Released on: 2026-05-20

Language
Private named parameters

Dart now supports private named parameters. Before 3.12, it was an error to
have a named parameter that starts with an underscore:

class Point {
  final int _x, _y;
  // Compile error in Dart 3.11.
  Point({required this._x, required this._y});
}

This means that, before 3.12, initializing a private field from
a named parameter required an explicit initializer list:

class Point {
  final int _x, _y;
  Point({required int x, required int y})
    : _x = x,
      _y = y;
}

All the initializer list is doing is removing the leading _.
In Dart 3.12, the language does that for you. Now you can write:

class Point {
  final int _x, _y; // Private fields.
  Point({required this._x, required this._y});
}

This code behaves exactly like the previous example. The initialized fields are
private, but the argument names written at the call site are public:

void main() {
  print(Point(x: 1, y: 2));
}
Libraries
dart:core
  • The Dart VM's RegExp implementation now supports
    modifier spans and duplicate named capture groups.
dart:js_interop
  • Breaking change in extension name of isA: isA is moved from
    JSAnyUtilityExtension to NullableObjectUtilExtension to support
    type-checking any Object?. isA<JSObject>() also now handles JS objects
    with no prototypes correctly and isA<JSAny>() does a non-trivial check to
    make sure the value is a JS value. See #​56905 for more details. As
    JSAnyUtilityExtension is on JSAny? and NullableObjectUtilExtension is on
    the supertype Object?, this change is only breaking if users referred to the
    extension name directly, either through applying the extension directly or
    through using show/hide directives.

  • isA<JSExportedDartFunction>() now checks whether the function is
    actually a JS wrapper function that is returned from
    Function.toJS or Function.toJSCaptureThis.

  • Added JSIterableProtocol, JSIterable, JSIteratorProtocol, JSIterator,
    and JSIteratorResult types to model JavaScript's iteration protocols.
    JSArray and JSString now implement JSIterable.

  • Added extension types to provide Iterable.toJSIterable,
    JSIterable.toDartIterable, Iterator.toJSIterator, and
    JSIterator.toDartIterator.

Tools
Analyzer
  • The new simple_directive_paths lint and its associated fix
    flag and simplify unnecessarily complex import and export paths,
    such as those containing redundant ./ or backtracking ../ segments.

    Use dart fix --code=simple_directive_paths (with either --dry-run or
    --apply) to bulk fix existing lint violations.

  • The prefer_initializing_formals lint rule highlights named parameters
    that could be private named parameters.

    Use dart fix --code=prefer_initializing_formals (with either --dry-run or
    --apply) to bulk fix existing lint violations.

  • Violations of the avoid_final_parameters lint can now be
    fixed with dart fix --code=avoid_final_parameters.

  • The analyzer now warns when a function that contains a
    parameter annotated with @mustBeConst is torn off.

  • The invalid_runtime_check_with_js_interop_types rule now checks for JS
    interop types used in a catch clause's on-type and instructs users to
    use isA for type checks instead.

  • Analyzer plugins: Initial support for 'print debugging' via new sections in
    the "Plugins" Insights (Diagnostics) page. When a plugin is computing lint
    and warning diagnostics, print calls are now redirected to the analysis
    server, which presents the messages in the appropriate plugin's section on
    the Plugins page.

  • Improved support for extension types in many existing lint rules.

  • Improved support for null-aware elements in existing lint rules.

  • The analysis server starts up faster with the help of improved analysis
    options file caching. The improvement depends on the number of analysis
    options files in the workspace, and the number of included analysis options
    files. The improvement is greater for systems with slower disk access.

  • Various other improvements to analysis performance.

Pub
  • dart pub cache repair now, by default, only repairs the
    packages referenced by the current project's pubspec.lock file.
    For the old behavior of repairing all packages, use the --all flag.
  • dart pub add and dart pub unpack now accept @ as an alternative to :
    for separating a package name from its version constraint.
  • Git dependencies now support Git Large File Storage (LFS).
Dart CLI
  • Added support for running remote package executables directly using the
    dart run <package>@<descriptor> syntax (#​62123). This enables dynamic
    execution of remote tools (similar to npx in Node) without requiring explicit
    installation or activation via dart pub global activate.
dart2wasm
  • Updated deferred loading module loader API to allow batched fetching of
    deferred modules. The embedder now takes loadDeferredModules instead of
    loadDeferredModule where the new function should now expect an array of
    module names rather than individual module names. All the module loading
    functions must now also accept an instantiator callback to which they
    should pass the loaded results.
dart2js
  • JSExportedDartFunction.toDart sometimes incorrectly returned the original
    Dart function even if the wrapper JS function was cast from a call to the
    deprecated allowInterop. Instead, to be consistent with DDC and dart2wasm,
    it now throws if the wrapper JS function wasn't a result of Function.toJS or
    Function.toJSCaptureThis.

v3.11.6

Compare Source

Released on: 2026-05-05

This is a patch release that:

  • Fixes a bug causing network profiling to stop working in certain situations.
    (issue [#​63156]).

v3.11.5

Compare Source

Released on: 2026-04-15

This is a patch release that:

  • Fixes an issue with the Dart MCP server and latest AntiGravity. (issue
    dart-lang/ai#439)

v3.11.4

Compare Source

Released on: 2026-03-24

This is a patch release that:

  • Fixes a bug causing the analyzer and analysis server to crash when calling a
    dot shorthand function expression invocation. (issue dart-lang/sdk#62595)

v3.11.3

Compare Source

Released on: 2026-03-17

This is a patch release that:

  • Fixes a bug causing Dart & Flutter DevTools to crash when using the skwasm renderer.
    (issue flutter/devtools#9701).

v3.11.2

Compare Source

Released on: 2026-03-10

This is a patch release that:

  • Fixes a bug in pub's support tag_pattern git dependencies that prevented it to
    load lightweight tags (as opposed to annotated tags).
    (issue dart-lang/pub#4756).

v3.11.1

Compare Source

Released on: 2026-02-24

This is a patch release that:

  • Fixes a performance issue in the Dart Analysis Server when analyzing a workspace with many files (issue #​62456)
  • Fixes a performance issue in the Dart Analysis Server when analyzing a workspace with many directories (issue #​62456)

v3.11.0

Compare Source

Released on: 2026-02-11

Language

There are no language changes in this release.

Libraries
dart:io
  • Added support for Unix domain sockets (AF_UNIX) on Windows. Support is
    restricted to the subset of features supported by the OS. Windows currently
    does not support the following features for AF_UNIX sockets: datagram
    sockets, ancillary data or abstract socket addresses. Unix domain sockets are
    represented in the file-system using reparse points which leads to some
    discrepancies in the behavior of dart:io APIs: for example
    File(socketPath).existsSync() will return true on POSIX operating systems,
    but false on Windows. Use FileSystemEntity.typeSync() instead to get
    portable behavior.
dart:js_interop
  • Added a constructor to JSSymbol, as well as JSSymbol.key,
    JSSymbol.description, and static methods for all well-known ECMAScript
    symbols.
dart:js_util
  • dart2wasm no longer supports dart:js_util. Any code that imports
    dart:js_util will no longer compile with dart2wasm. Consequently, code that
    depends on package:js will no longer compile with dart2wasm either. The name
    dart.library.js_util is no longer a key in dart2wasm compilation
    environments, including in conditional imports and exports.
    See #​61550 for more details.
Tools
Analyzer
  • The Insights pages (aka the "Analysis Server Diagnostics" pages) now show
    data regarding the "Message Scheduler."
  • The "Fix all in workspace" command now supports a progress indicator.
  • Analysis via analyzer plugins is now faster on subsequent runs, as the
    analysis server will now re-use an existing AOT snapshot of the plugins
    entrypoint. This saves a constant amount of time at the start of each IDE
    session and dart analyze run, on the order of 10 seconds.
  • Various fixes are made for the call method on a Function object, like "go
    to definition," and completion.
  • Various fixes are made for the error and stackTrace parameters of
    try/catch statements.
  • Various fixes are made for syntax highlighting, navigation, code completion,
    hovers, quick fixes, assists, "rename" refactoring, and "go to imports."
  • Various fixes for IDE features with regards to "Dot Shorthand" syntax.
  • Improvements to LSP format-on-type, to not format in undesirable cases.
  • Various performance improvements.
  • Fixes to the 'Extract Widget' refactoring.
  • (Thanks @​FMorschel and
    @​DanTup for many of the above enhancements!)
  • A new lint rule is offered: simplify_variable_pattern, which encourages
    using the pattern shorthand for variables and property names of the same
    name.
  • The avoid_null_checks_in_equality_operators lint rule is now deprecated.
  • The prefer_final_parameters lint rule is now deprecated.
  • The use_if_null_to_convert_nulls_to_bools lint rule is now deprecated.
Dart Development Compiler (dartdevc)
  • The async timing of the Future returned by deferred_prefix.loadLibrary()
    is now consistent regardless if proper deferred imports are supported in the
    runtime environment or not. This makes the timing more consistent with dart2js
    where the loads are always an async operation.
Pub
  • "Glob" support for pub workspaces.

    Now to include all packages inside pkgs/ in the workspace, simply write:

    workspace:
      - pkgs/*

    Supported if the Dart SDK constraint of the containing package is 3.11.0 or
    higher.

  • New command dart pub cache gc for reclaiming disk space from your pub
    cache.

    It works by removing packages from your pub cache that are not referenced by
    any of your current projects.

  • New flag dart pub publish --dry-run --ignore-warnings

    Given this flag, dart pub publish --dry-run will only exit non-zero if your
    project validation has errors.

  • dart pub cache repair now by default only repairs the packages referenced
    by the current projects pubspec.lock. For the old behavior of repairing all
    packages use the --all flag.

v3.10.9

Compare Source

Released on: 2026-02-03

This is a patch release that:

  • Fixes a bug that allowed users to access private declarations in other
    libraries with dot shorthands. (issue dart-lang/sdk#62504)

v3.10.8

Compare Source

Released on: 2026-01-27

This is a patch release that:

  • Removes code completion of private declarations in other libraries for dot
    shorthands. (issue dart-lang/sdk#62416)

v3.10.7

Compare Source

Released on: 2025-12-23

This is a patch release that:

v3.10.6

Compare Source

Released on: 2025-12-16

This is a patch release that:

v3.10.5

Compare Source

Released on: 2025-12-16

This is a patch release that:

  • Fixes several issues with elements that are deprecated with one of the new
    "deprecated functionality" annotations, like @Deprecated.implement. This
    fix directs IDEs to not display such elements (like the RegExp class) as
    fully deprecated (for example, with struck-through text). (issue
    dart-lang/sdk#62013)
  • Fixes code completion for dot shorthands in enum constant arguments. (issue
    dart-lang/sdk#62168)
  • Fixes code completion for dot shorthands and the != operator. (issue
    dart-lang/sdk#62216)

v3.10.4

Compare Source

Released on: 2025-12-09

This is a patch release that:

  • Fixes an issue with dart run not working and simply exiting with
    Process::Exec - (null) under GitBash on Windows.
    (issue dart-lang/sdk#61981)

v3.10.3

Compare Source

Released on: 2025-12-02

This is a patch release that:

  • Fixes an issue with the color picker not working with dot shorthands. (issue
    Dart-Code/Dart-Code#61978)
  • Enables hiding Running build hooks in dart run with --verbosity=error.
    (issue dart-lang/sdk#61996)
  • Fixes an issue with test_with_coverage and build hooks in dev dependencies.
    (issue dart-lang/tools#2237)
  • Fixes an issue where a crash could occur when evaluating expressions
    after a recompilation (issue flutter/flutter#178740).
  • Fixes watching of directory moves on MacOS dart-lang/sdk#62136.
  • Fixes an issue with the analyzer not emitting an error when using a dot
    shorthand with type arguments on a factory constructor in an abstract class.
    (issue dart-lang/sdk#61978)

v3.10.2

Compare Source

Released on: 2025-11-25

This is a patch release that:

  • Fixes an issue with code completion for argument lists in a dot shorthand
    invocation, as well as an issue with renaming dot shorthands.
    (issue dart-lang/sdk#61969)
  • Fixes an issue in dart2wasm that causes the compiler to crash for switch
    statements that contain int cases and a null case.
    (issue dart-lang/sdk#62022)
  • Fixes an issue with renaming fields/parameters on dot shorthand
    constructor invocations.
    (issue dart-lang/sdk#62036)

v3.10.1

Compare Source

Released on: 2025-11-18

This is a patch release that:

  • Fixes an issue with dot shorthand code completion for the == operator,
    FutureOr types, switch expressions, and switch statements.
    (issue dart-lang/sdk#61872).
  • Fixes an issue with the analyzer not reporting an error when invoking an
    instance method with a dot shorthand. (issue dart-lang/sdk#61954).
  • Fixes a crash with the ExitDetector in the analyzer missing a few visitor
    methods for dot shorthand AST nodes. (issue dart-lang/sdk#61963)
  • Fixes an analyzer crash that would sometimes occur when the
    prefer_const_constructors lint was enabled (issue dart-lang/sdk#61953).
  • Updates dartdoc dependency to dartdoc 9.0.0 which fixes dartdoc rendering of
    @Deprecated.extend() and the other new deprecated annotations.

v3.10.0

Compare Source

Released on: 2025-11-12

Language

Dart 3.10 adds dot shorthands to the language. To use
them, set your package's [SDK constraint][language version] lower bound to 3.10
or greater (sdk: '^3.10.0').

Dart 3.10 also adjusts the inferred return type of a generator function (sync*
or async*) to avoid introducing unneeded nullability.

Dot shorthands

Dot shorthands allow you to omit the type name when accessing a static member
in a context where that type is expected.

These are some examples of ways you can use dot shorthands:

Color color = .blue;
switch (color) {
  case .blue:
    print('blue');
  case .red:
    print('red');
  case .green:
    print('green');
}
Column(
  crossAxisAlignment: .start,
  mainAxisSize: .min,
  children: widgets,
)

To learn more about the feature, check out the
feature specification.

Eliminate spurious Null from generator return type

The following local function f used to have return type Iterable<int?>.
The question mark in this type is spurious because the returned iterable
will never contain null (return; stops the iteration, it does not add null
to the iterable). This feature makes the return type Iterable<int>.

void main() {
  f() sync* {
    yield 1;
    return;
  }
}

This change may cause some code elements to be flagged as unnecessary. For
example, f().first?.isEven is flagged, and f().first.isEven is recommended
instead.

Tools
Analyzer
  • The analyzer includes a new plugin system. You can use this system to write
    your own analysis rules and IDE quick fixes.

    • Analysis rules: Static analysis checks that report diagnostics (lints
      or warnings). You see these in your IDE and at the command line via dart analyze or flutter analyze.
    • Quick fixes: Local refactorings that correct a reported lint or
      warning.
    • Quick assists: Local refactorings available in the IDE that are not
      associated with a specific diagnostic.

    See the documentation for writing an analyzer plugin, and the
    documentation for using analyzer plugins to learn more.

  • Lint rules which are incompatible with each other and which are specified in
    included analysis options files are now reported.

  • Offer to add required named field formal parameters in a constructor when a
    field is not initialized.

  • Support the new @Deprecated annotations by reporting warnings when specific
    functionality of an element is deprecated.

  • Offer to import a library for an appropriate extension member when method or
    property is accessed on a nullable value.

  • Offer to remove the const keyword for a constructor call which includes a
    method invocation.

  • Remove support for the deprecated @required annotation.

  • Add two assists to bind constructor parameters to an existing or a
    non-existing field.

  • Add a warning which is reported when an @experimental member is used
    outside of the package in which it is declared.

  • Add a new lint rule, remove_deprecations_in_breaking_versions, is added to
    encourage developers to remove any deprecated members when the containing
    package has a "breaking version" number, like x.0.0 or 0.y.0.

  • (Thanks @​FMorschel for many of the above
    enhancements!)

Hooks

Support for hooks -- formerly know as native assets -- are now stable.

You can currently use hooks to do things such as compile or download native assets
(code written in other languages that are compiled into machine code),
and then call these assets from the Dart code of a package.

For more details see the hooks documentation.

Dart CLI and Dart VM
  • The Dart CLI and Dart VM have been split into two separate executables.

    The Dart CLI tool has been split out of the VM into it's own embedder which
    runs in AOT mode. The pure Dart VM executable is called dartvm and
    has no Dart CLI functionality in it.

    The Dart CLI executable parses the CLI commands and invokes the rest
    of the AOT tools in the same process, for the 'run' and 'test'
    commands it execs a process which runs dartvm.

    dart hello.dart execs the dartvm process and runs the hello.dart file.

    The Dart CLI is not generated for ia32 as we are not shipping a
    Dart SDK for ia32 anymore (support to execute the dartvm for ia32
    architecture is retained).

  • Added the dart install command suite (including dart installed and
    dart uninstall) as the modern way to globally install and run Dart CLI
    tools. It compiles tools to self-contained, native AOT binaries using
    dart build cli. For details, see the
    dart install documentation.

Libraries
dart:async
  • Added Future.syncValue constructor for creating a future with a
    known value. Unlike Future.value, it does not allow an asynchronous
    Future<T> as the value of a new Future<T>.
dart:core
  • Breaking Change #​61392: The Uri.parseIPv4Address function
    no longer incorrectly allows leading zeros. This also applies to
    Uri.parseIPv6Address for IPv4 addresses embedded in IPv6 addresses.
  • The Uri.parseIPv4Address adds start and end parameters
    to allow parsing a substring without creating a new string.
  • New annotations are offered for deprecating specific functionalities:
  • The ability to implement the RegExp class and the RegExpMatch class is
    deprecated.
dart:io
  • Breaking Change #​56468: Marked IOOverrides as an abstract base
    class so it can no longer be implemented.
  • Added ability to override behavior of exit(...) to IOOverrides.
dart:js_interop
  • JSArray.add is added to avoid cases where during migration from List to
    JSArray, JSAnyOperatorExtension.add is accidentally used. See #​59830
    for more details.
  • isA<JSBoxedDartObject> now checks that the value was the result of a
    toJSBox operation instead of returning true for all objects.
  • For object literals created from extension type factories, the @JS()
    annotation can now be used to change the name of keys in JavaScript. See
    #​55138 for more details.
  • Compile-time checks for Function.toJS now apply to toJSCaptureThis as
    well. Specifically, the function should be a statically known type, cannot
    contain invalid types in its signature, cannot have any type parameters, and
    cannot have any named parameters.
  • On dart2wasm, typed lists that are wrappers around typed arrays now return the
    original typed array when unwrapped instead of instantiating a new typed array
    with the same buffer. This applies to both the .toJS conversions and
    jsify. See #​61543 for more details.
  • Uint16ListToJSInt16Array is renamed to Uint16ListToJSUint16Array.
  • JSUint16ArrayToInt16List is renamed to JSUint16ArrayToUint16List.
  • The dart2wasm implementation of dartify now converts JavaScript Promises
    to Dart Futures rather than JSValues, consistent with dart2js and DDC. See
    #​54573 for more details.
  • createJSInteropWrapper now additionally takes an optional parameter which
    specifies the JavaScript prototype of the created object, similar to
    createStaticInteropMock in dart:js_util. See #​61567 for more details.
dart:js_util
  • dart2wasm no longer supports dart:js_util and will throw an
    UnsupportedError if any API from this library is invoked. This also applies
    to package:js/js_util.dart. package:js/js.dart continues to be supported.
    See #​61550 for more details.

v3.9.4

Compare Source

Released on: 2025-09-30

Pub
  • dart pub get --example will now resolve example/ folders in the
    entire workspace, not only in the root package.
    This fixes dart-lang/pub#4674 that made flutter pub get
    crash if the examples had not been resolved before resolving the workspace.

v3.9.3

Compare Source

Released on: 2025-09-09

Tools
Development JavaScript compiler (DDC)
  • Fixes a pattern that could lead to exponentially slow compile times when
    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.2

Compare Source

Released on: 2025-08-27

Tools
Development JavaScript compiler (DDC)
  • Fixes an unintentional invocation of class static getters during a
    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.1

Compare Source

Released on: 2025-08-20

This is a patch release that:

  • Fixes an issue in DevTools causing assertion errors in the terminal after
    clicking 'Clear' on the Network Screen (issue dart-lang/sdk#61187).
  • Fixes miscompilation to ARM32 when an app used
    a large amount of literals (issue flutter/flutter#172626).
  • Fixes an issue with git dependencies using tag_pattern,
    where the pubspec.lock file would not be stable when
    running dart pub get (issue dart-lang/pub#4644).

v3.9.0

Compare 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, and dart 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-snapshot flag may be passed to these commands. (Please file an
    issue 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.analyzerAdditionalArgs setting. To direct the Dart
    IntelliJ plugin to pass this flag, use the dart.server.additional.arguments
    registry property, similar to these steps.

  • Add the switch_on_type lint rule.

  • Add the unnecessary_unawaited lint rule.

  • Support a new annotation, @awaitNotRequired, which is used by the
    discarded_futures and unawaited_futures lint rules.

  • Improve the avoid_types_as_parameter_names lint rule to include type
    parameters.

  • 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_futures and unawaited_futures
    lint 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_type
    • implicit_this_reference_in_initializer
    • prefer_foreach
    • undefined_operator
    • use_if_null_to_convert_nulls_to_bools
  • Numerous 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_overrides in a pubspec.yaml file now
    have 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
  • Breaking change of feature in preview: dart build -f exe <target> is now
    dart build cli --target=<target>. See dart build cli --help for 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 calling
    JSPromise.toDart from thedart:js_interop and the underlying the
    dart:js_util helper promiseToFuture. Dart callbacks will not be run, but
    callbacks 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 dynamic or Function.

    A getter defined as:

    class Container<T> {
      T get value => _value;
      ...
    }

    Could trigger the issue with a direct invocation:

    Container<dynamic>().value('Invocation with missing runtime checks!');
Dart native compiler

Added cross-compilation support for
target architectures of arm (ARM32) and riscv64 (RV64GC)
when the target OS is Linux.

Pub
  • Git dependencies can now be version-solved based on git tags.

    Use a tag_pattern in the descriptor and a version constraint, and all
    commits matching the pattern will be considered during resolution. For
    example:

    dependencies:
      my_dependency:
        git:
          url: https://github.com/example/my_dependency
          tag_pattern: v{{version}}
        version: ^2.0.1
  • Starting from language version 3.9 the flutter constraint upper bound is now
    respected in your root package. For example:

    name: my_app
    environment:
      sdk: ^3.9.0
      flutter: 3.33.0

    Results in dart pub get failing if invoked with a version of
    the 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.3

Compare Source

Released on: 2025-07-31

This is a patch release that:

  • Fixes an issue with the DevTools Network screen and Hot Restart (issue flutter/devtools#9203)
  • Fixes an issue when clearing the DevTools network screen (issue #​61187)

v3.8.2

Compare Source

Released on: 2025-07-16

This is a patch release that:

  • Fixes an issue with the size of cross-compiled binaries (issue #​61097)

v3.8.1

Compare Source

Released on: 2025-05-28

This is a patch release that:

  • Fixes an issue in DDC with late variables being incorrectly captured within
    async function bodies (issue #​60748).

v3.8.0

Compare 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:

String? lunch = isTuesday ? 'tacos!' : null;

var withoutNullAwareElements = [
  if (lunch != null) lunch,
  if (lunch.length != null) lunch.length!,
  if (lunch.length case var length?) length,
];

var withNullAwareElements = [
  ?lunch,
  ?lunch.length,
  ?lunch.length,
];

To learn more about null-aware collection elements,
check out the documentation
and the feature specification.

Libraries
dart:core
  • Added Iterable.withIterator constructor.
dart:io
  • Added HttpClientBearerCredentials.
  • Updated Stdout.supportsAnsiEscapes and Stdin.supportsAnsiEscapes to
    return true for TERM containing tmux values.
dart:html
  • Breaking change: Native classes in dart:html, like HtmlElement, can no
    longer be extended. Long ago, to support custom elements, element classes
    exposed a .created constructor that adhered to the v0.5 spec of web
    components. 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 registerElement APIs. See
    #​53264 for details.
dart:ffi
  • Added Array.elements which exposes an Iterable over the Array's content.
Tools
Analyzer
  • The analyzer now supports "doc imports," a new comment-based syntax which
    enables external elements to be referenced in documentation comments without
    actually importing them. See [the
    documentation](https://dart.dev/tool

Note

PR body was truncated to here.


Configuration

📅 Schedule: (in timezone Africa/Johannesburg)

  • Branch creation
    • "after 9pm,before 6am"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies renovate bot related dependency upgrades label Aug 27, 2023
@renovate
renovate Bot enabled auto-merge (squash) August 27, 2023 23:52
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from 4e8eeff to 478e9d5 Compare November 1, 2025 20:10
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch 2 times, most recently from c36956e to d46a3de Compare November 19, 2025 19:56
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from d46a3de to af6b77b Compare November 26, 2025 11:56
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from af6b77b to 52d7290 Compare December 4, 2025 19:37
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch 2 times, most recently from 9f93e86 to 3c81af9 Compare December 18, 2025 11:42
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from 3c81af9 to 6a2af32 Compare December 23, 2025 11:45
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from 6a2af32 to 294f200 Compare January 27, 2026 12:10
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch 2 times, most recently from 5a58ee2 to 91adb2c Compare February 10, 2026 08:08
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from 91adb2c to bdd617c Compare March 1, 2026 09:17
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from bdd617c to 582e664 Compare March 14, 2026 09:19
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from 582e664 to 840075b Compare March 31, 2026 16:45
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from 840075b to fe41d3f Compare April 15, 2026 12:37
@renovate renovate Bot changed the title chore(deps): update dependency dart to v3 Update dependency dart to v3 Apr 15, 2026
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from fe41d3f to ed46342 Compare May 6, 2026 15:38
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch 2 times, most recently from 68cf775 to 968e191 Compare May 26, 2026 20:15
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from 968e191 to c57dc93 Compare June 13, 2026 03:49
@renovate
renovate Bot force-pushed the renovate/dart-3.x branch from c57dc93 to f2d653f Compare August 16, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies renovate bot related dependency upgrades

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants