Skip to main content

Dart changelog

A complete changelog for Dart.

This page lists the full history of changes to the Dart SDK and Dart language, organized by release. We use tags to classify changes, such as New for features, Fixed for bugs, and Breaking for incompatible changes. Some changes are Language versioned, meaning they only take effect when you upgrade your code's language version.

3.13

#
Language Primary constructors #
New Language versioned

Released: 2026-08-12

Added primary constructors, a concise syntax for declaring a constructor and instance variables in a declaration header. This language feature requires a language version of 3.13 or later.

Language Parameter declarations #
Language versioned

Released: 2026-08-12

You can no longer use final or var on non-declaring parameters. Dart now reserves both for declaring parameters in primary constructors. Remove final or var from affected parameter declarations. If you still want to prevent parameter reassignment, you can use the parameter_assignments lint rule.

Language Type promotion #
Breaking Fixed

Released: 2026-08-12

Breaking change: Updated type promotion rules to fix unsound behavior. For details, see SDK issue #62889.

Libraries dart:async #
New

Released: 2026-08-12

Added Future.pause as an alternative to Future.delayed without a callback.

Libraries dart:core #
New

Released: 2026-08-12

Added List.unmodifiableOf, providing stronger static typing than List.unmodifiable.

Libraries dart:core #
New

Released: 2026-08-12

Added Map.unmodifiableOf, providing stronger static typing than Map.unmodifiable.

Libraries dart:core #
New

Released: 2026-08-12

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 web targets, they operate on the least significant 32 bits. For details, see SDK issue #52673.

Libraries dart:io #
Fixed

Released: 2026-08-12

Fixed cookie date parsing to follow the permissive algorithm specified in the HTTP state management RFC. The parser now accepts non-standard date formats again, rather than restricting inputs to strictly formatted dates.

Libraries dart:io #
Fixed

Released: 2026-08-12

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

Libraries dart:io #
Breaking New

Released: 2026-08-12

Breaking change: Added InterfaceAddress, a subtype of InternetAddress that exposes a prefixLength field and a broadcast getter for network interfaces. NetworkInterface.addresses now returns List<InterfaceAddress> instead of List<InternetAddress>. Classes implementing NetworkInterface and overriding addresses must update their return type accordingly. For details, see SDK issue #63216.

Libraries dart:io #
Changed

Released: 2026-08-12

InternetAddress.lookup no longer accepts non-standard IPv4 address formats historically accepted by inet_aton.

Libraries dart:isolate #
New

Released: 2026-08-12

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.

Libraries dart:js_interop #
Changed

Released: 2026-08-12

Made JSFunction and JSExportedDartFunction generic for increased static type safety. JSExportedDartFunction<T>.toDart now casts the wrapped function to type T, and isA<JSExportedDartFunction<T>> checks that the wrapped function is a T. The type argument T is otherwise purely descriptive; runtime types of JSFunction and JSExportedDartFunction remain unchanged. For details, see SDK issue #54557.

Libraries dart:js_interop #
New

Released: 2026-08-12

Added JSObject.getPrototypeOf to dart:js_interop for retrieving JavaScript object prototypes.

Tools Analyzer #
New

Released: 2026-08-12

Added LSP support for Inline Values (textDocument/inlineValue), allowing IDEs and debuggers to render inline variable evaluations during active debugging sessions.

Tools Analyzer #
New Experimental

Released: 2026-08-12

Added custom LSP methods (dart/textDocument/getFlutterWidgetPreviews and dart/workspace/getFlutterWidgetPreviews) to serve Flutter Widget Preview metadata to editor clients.

Tools Analyzer #
New

Released: 2026-08-12

Added custom LSP method dart/connectToDtd, enabling language server clients to pair the Analysis Server with the Dart Tooling Daemon (DTD).

Tools Analyzer #
New

Released: 2026-08-12

Added the no_raw_types lint rule, replacing the strict-raw-types analysis option for more consistent type checking.

Tools Analyzer #
New

Released: 2026-08-12

Added the no_dynamic_casts lint rule, replacing the strict-casts analysis option for more consistent type checking.

Tools Analyzer #
Deprecated

Released: 2026-08-12

Deprecated low-value lint rules avoid_private_typedef_functions and one_member_abstracts. To continue using these rules, re-implement them with analyzer plugins.

Tools Linter #
New

Released: 2026-08-12

Added async_return_with_no_await lint rule, which warns on async functions returning a non-Future value without using await.

Tools Linter #
New

Released: 2026-08-12

Added empty_container_bodies lint rule, which flags empty bodies in classes, enums, mixins, or extensions.

Tools Linter #
New

Released: 2026-08-12

Added initialize_in_field_declaration lint rule, which recommends initializing fields at their declaration site where applicable.

Tools Linter #
New

Released: 2026-08-12

Added unnecessary_const_in_enum_constructor lint rule, which flags redundant const keywords in enum constructors.

Tools Linter #
New

Released: 2026-08-12

Added unnecessary_primary_constructor_body lint rule, which flags unnecessary or empty bodies on primary constructors.

Tools Linter #
New

Released: 2026-08-12

Added unnecessary_type_name_in_constructor lint rule, which flags redundant explicit type names in constructor declarations.

Tools Linter #
New

Released: 2026-08-12

Added use_declaring_parameters lint rule, which encourages declaring parameters in primary constructors.

Tools Linter #
New Experimental

Released: 2026-08-12

Added experimental use_primary_constructors lint rule, which encourages adopting primary constructor syntax when primary constructors are enabled.

Tools Formatter #
Changed

Released: 2026-08-12

dart format --version --verbose now displays supported language versions.

Tools Formatter #
Fixed

Released: 2026-08-12

Fixed a crash in dart format when an analysis_options.yaml file includes a non-existent or unreadable file (dart_style #1840).

Tools Formatter #
Fixed

Released: 2026-08-12

Fixed an eager splitting optimization bug that caused collections or argument lists to split unnecessarily in rare cases (dart_style #1809).

Tools Formatter #
Fixed

Released: 2026-08-12

Prevented dart format from inserting an unwanted blank line before a comment at the end of a compilation unit or braced body (dart_style #1644).

Tools Formatter #
Fixed

Released: 2026-08-12

Formatted extension type representation clauses consistently with primary constructor formal parameter lists.

Tools Formatter #
Fixed

Released: 2026-08-12

Fixed formatting in enums with members so a newline is not inserted before the ; unless a trailing comma is present.

Tools Formatter #
Changed Language versioned

Released: 2026-08-12

Added trailing commas to split extension type representation clauses when formatting code at language version 3.13 or higher (dart_style #1845).

Tools Formatter #
Fixed Language versioned

Released: 2026-08-12

Fixed an eager splitting optimization bug that led the formatter to prefer suboptimal line splits (dart_style #1847).

Tools Formatter #
Changed Language versioned

Released: 2026-08-12

Improved formatting to prefer splitting call chains for single-element targets (dart_style #1732).

Tools Formatter #
Changed Language versioned

Released: 2026-08-12

Added support for block formatting parameter lists (dart_style #1693).

Tools Formatter #
Changed Language versioned

Released: 2026-08-12

Added support for block formatting as, is, and is! expressions (dart_style #1542).

Tools Formatter #
Changed Language versioned

Released: 2026-08-12

Updated dart format to separate imports into distinct sections (dart_style #1120).

Tools Formatter #
Changed Language versioned

Released: 2026-08-12

Updated dart format to split if-case guards when the associated pattern block-splits (dart_style #1596).

Tools Formatter #
Changed Language versioned

Released: 2026-08-12

When formatting code that exceeds page width limits, preferred solutions where overflowing lines end in string literals or comments (dart_style #1802, dart_style #1803, and dart_style #1837).

Tools Formatter #
Changed Language versioned

Released: 2026-08-12

Enforced blank lines around mixin and extension type declarations without a ; body.

Tools Pub #
New

Released: 2026-08-12

Added dart pub workspace list to list all workspace packages and their directory paths, with support for --json output.

Tools Pub #
New

Released: 2026-08-12

Added dart pub cache preload for installing packages directly into PUB_CACHE from .tar.gz archives.

Tools Dart CLI #
New

Released: 2026-08-12

Added cross-compilation support to dart build cli via the --target-os and --target-arch flags.

Tools Dart CLI #
Changed

Released: 2026-08-12

Updated dart build and dart compile to support using locally built target binaries from a local SDK build directory (identified by build.ninja), avoiding downloads from Google Cloud Storage.

Dart Runtime #
Removed

Released: 2026-08-12

Removed built-in fallback root certificates when system certificates are missing. Use --root-certs-file or --root-certs-cache options to provide certificates manually.

Dart Runtime C Embedder API #
Breaking

Released: 2026-08-12

Breaking change: Updated Dart_FileModifiedCallback in dart_tools_api.h to pass int64_t since in microseconds since epoch instead of milliseconds, matching FileStat microsecond precision.

Dart Runtime C Embedder API #
New

Released: 2026-08-12

Added Dart_SetCurrentThreadOwnsIsolate and Dart_GetCurrentThreadOwnsIsolate functions to dart_api.h and dart_api_dl.h, allowing custom embedders to bind and query isolate thread ownership.

3.12

#
Language Private named parameters #
New

Released: 2026-05-18

Introduced support for private named parameters on initializing formals and primary constructor parameters. This feature allows constructors to accept named parameters that directly initialize private fields. The leading underscore is automatically omitted to determine the public parameter name at the call site.

Libraries dart:core #
New

Released: 2026-05-18

The Dart VM RegExp implementation now supports modifier spans and duplicate named capture groups.

Libraries dart:js_interop #
Breaking

Released: 2026-05-18

Moved isA from JSAnyUtilityExtension to NullableObjectUtilExtension to support type-checking any Object?. In addition, isA<JSObject>() correctly evaluates JS objects that lack prototypes, and isA<JSAny>() robustly verifies that a value is a valid JS value. Because NullableObjectUtilExtension applies to the broader Object? supertype rather than JSAny?, this migration is backwards-compatible for most code. This change breaks existing code only if you explicitly referenced the JSAnyUtilityExtension name by applying the extension directly or by importing it with show/hide directives.

Libraries dart:js_interop #
Changed

Released: 2026-05-18

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

Libraries dart:js_interop #
New

Released: 2026-05-18

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

Libraries dart:js_interop #
New

Released: 2026-05-18

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

Tools Analyzer #
New

Released: 2026-05-18

The new simple_directive_paths lint flags unnecessarily complex import and export paths, such as paths containing redundant ./ or backtracking ../ segments. The associated quick fix simplifies these paths automatically.

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

Tools Analyzer #
Changed

Released: 2026-05-18

The prefer_initializing_formals lint rule now reports named parameters that qualify as private named parameters, if the package pubspec enables the language feature (for example, sdk: ^3.12.0).

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

Tools Analyzer #
New

Released: 2026-05-18

dart fix now supports fixing avoid_final_parameters lint violations using dart fix --code=avoid_final_parameters (with either --dry-run or --apply).

Tools Analyzer #
Changed

Released: 2026-05-18

The analyzer now warns when tearing off a function that has a @mustBeConst annotated parameter.

Tools Analyzer #
Changed

Released: 2026-05-18

The invalid_runtime_check_with_js_interop_types rule now checks for JS interop types within catch clauses and instructs you to use isA for type checks instead.

Tools Analyzer #
New

Released: 2026-05-18

Added initial support for 'print debugging' via new sections in the "Plugins" Insights (Diagnostics) page. When a plugin computes lint and warning diagnostics, the analysis server now redirects print calls and presents the messages in the appropriate plugin's section on the Plugins page.

Tools Analyzer #
Changed

Released: 2026-05-18

Improved support for extension types in many existing lint rules.

Tools Analyzer #
Changed

Released: 2026-05-18

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

Tools Analyzer #
Changed

Released: 2026-05-18

The analysis server starts up faster due to improved caching of analysis options files. The exact speedup depends on the number of analysis options files in your workspace and the number of included files, with the greatest improvements seen on systems with slower disk access.

Tools Pub #
Changed

Released: 2026-05-18

dart pub cache repair now by default only repairs the packages referenced by your current project's pubspec.lock. To repair all packages, use the --all flag.

Tools Pub #
Changed

Released: 2026-05-18

dart pub add and dart pub unpack now accept @ as an alternative to : for separating a package name from its version constraint.

Tools Pub #
New

Released: 2026-05-18

Git dependencies now support LFS.

Tools dart2wasm #
Changed

Released: 2026-05-18

Updated the deferred loading module loader API to support batched fetching of deferred modules. The embedder now uses loadDeferredModules instead of loadDeferredModule. This new callback accepts an array of module names rather than a single module name. In addition, all module loading functions must accept an instantiator callback and pass the loaded results to it.

Tools dart2js #
Fixed

Released: 2026-05-18

JSExportedDartFunction.toDart sometimes incorrectly returned the original Dart function even if the wrapper JS function was cast from a call to the deprecated allowInterop. 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.

3.11

#
Libraries dart:io #
New

Released: 2026-02-11

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 filesystem 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.

Libraries dart:js_interop #
New

Released: 2026-02-11

Added a constructor to JSSymbol, as well as JSSymbol.key, JSSymbol.description, and static methods for all well-known ECMAScript symbols.

Libraries dart:js_util #
Breaking Removed

Released: 2026-02-11

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.

Tools Analyzer #
Changed

Released: 2026-02-11

The Insights pages (aka the "Analysis Server Diagnostics" pages) now show data regarding the "Message Scheduler."

Tools Analyzer #
New

Released: 2026-02-11

The "Fix all in workspace" command now supports a progress indicator.

Tools Analyzer #
Changed

Released: 2026-02-11

Analysis via analyzer plugins is now faster on subsequent runs, as the analysis server will now re-use an existing AOT snapshot of the plugin's 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.

Tools Analyzer #
Fixed

Released: 2026-02-11

Various fixes were made for the call method on a Function object, like "go to definition," and completion.

Tools Analyzer #
Fixed

Released: 2026-02-11

Various fixes were made for the error and stackTrace parameters of try/catch statements.

Tools Analyzer #
Fixed

Released: 2026-02-11

Various fixes were made for syntax highlighting, navigation, code completion, hovers, quick fixes, assists, "rename" refactoring, and "go to imports."

Tools Analyzer #
Fixed

Released: 2026-02-11

Fixed various issues with support for the "dot shorthands" syntax in IDEs.

Tools Analyzer #
Fixed

Released: 2026-02-11

Implemented LSP format-on-type improvements to not format in undesirable cases.

Tools Analyzer #
Fixed

Released: 2026-02-11

Fixes to the "Extract Widget" refactoring.

Tools Analyzer #
New

Released: 2026-02-11

A new lint rule was added: simplify_variable_pattern, which encourages using the pattern shorthand for variables and property names of the same name.

Tools Analyzer #
Deprecated

Released: 2026-02-11

The avoid_null_checks_in_equality_operators lint rule is now deprecated.

Tools Analyzer #
Deprecated

Released: 2026-02-11

The prefer_final_parameters lint rule is now deprecated.

Tools Analyzer #
Deprecated

Released: 2026-02-11

The use_if_null_to_convert_nulls_to_bools lint rule is now deprecated.

Tools Dart development compiler (dartdevc) #
Changed

Released: 2026-02-11

The async timing of the Future returned by deferred_prefix.loadLibrary() is now consistent regardless of whether 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.

Tools Pub #
New Language versioned

Released: 2026-02-11

"Glob" support has been added for pub workspaces. Now to include all packages inside pkgs/ in the workspace, simply write:

yaml
workspace:
  - pkgs/*

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

Tools Pub #
New

Released: 2026-02-11

Added the 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.

Tools Pub #
New

Released: 2026-02-11

When running a dry run of dart pub publish with the --dry-run flag, you can now ignore warnings with the --ignore-warnings flag.

When you specify this flag, the dry run will only exit with a non-zero exit code if package validation has errors.

SDK Platform updates #
Changed

Released: 2026-02-11

Added support for Unix domain sockets on Windows in dart:io. Also removed support for dart:js_util in dart2wasm, requiring migration to dart:js_interop.

Tools Wasm compilation #
Removed Breaking

Released: 2026-02-11

Code that imports dart:js_util or package:js now results in a compilation error when compiling to WebAssembly. Invoking any API from these libraries will result in a runtime error. Usages should be migrated to dart:js_interop and dart:js_interop_unsafe.

3.10

#
Language Dot shorthands #
Changed

Released: 2025-11-12

Introduced dot shorthands for enums and other static members, allowing you to omit the type name when the context makes it clear. It also improves type inference for sync* and async* generator functions, eliminating spurious null from their return types. The analyzer now supports a new plugin system for custom rules and quick fixes, and several new lints and assists have been added. Additionally, the Dart CLI has been split from the Dart VM into a separate executable.

Language Generator functions #
Fixed

Released: 2025-11-12

sync* and async* generator functions without a specified return now correctly infer return types as non-nullable when no null value is yielded. This might trigger new diagnostics related to unnecessary code elements, such as an unnecessary null-aware access operator (?.).

Libraries dart:core #
Fixed

Released: 2025-11-12

The Uri.parseIPv4Address and Uri.parseIPv6Address functions no longer incorrectly allow leading zeros in IPv4 addresses.

Libraries dart:core #
Deprecated

Released: 2025-11-12

The ability to implement RegExp and RegExpMatch is deprecated and will be removed in a future release.

Libraries dart:io #
Deprecated

Released: 2025-11-12

IOOverrides can no longer be implemented, but can still be extended.

Libraries dart:js_interop #
Changed

Released: 2025-11-12

The Uint16ListToJSInt16Array extension has been renamed to Uint16ListToJSUint16Array.

Libraries dart:js_interop #
Changed

Released: 2025-11-12

The JSUint16ArrayToInt16List extension has been renamed to JSUint16ArrayToUint16List.

Libraries dart:js_interop #
Changed

Released: 2025-11-12

The Function.toJSCaptureThis function now results in addditional compile-time checks to match Function.toJS. If the function doesn't have a statically known type, has unsupported types in its signature, includes type parameters, or has any named parameters, the call will result in a compile-time error.

Tools SDK #
Changed

Released: 2025-11-12

The dart CLI and Dart VM are now separate executables, with the pure Dart VM executable and process called dartvm. Dart programs should still be run with dart run.

Tools SDK #
Changed

Released: 2025-11-12

Subcommands of the dart tool, such as dart format and dart compile now run AOT-compiled snapshots of the underlying tools. There should be no functional difference outside of performance improvements, but if you come across incompatibilities, please report them.

Tools SDK #
Removed Breaking

Released: 2025-11-12

The dart tool is no longer available for IA32 platforms as the Dart SDK no longer supports IA32.

Tools Analyzer #
Changed

Released: 2025-11-12

Using members marked as @experimental outside the package they are declared in now results in a warning.

Tools Analyzer #
Changed

Released: 2025-11-12

Lint rules enabled in included analysis options files now result in incompatible lint diagnostics when appropriate.

Tools Analyzer #
Removed Breaking

Released: 2025-11-12

The deprecated @required annotation from package:meta is no longer supported. To mark a parameter as required, instead use the required keyword.

Tools Wasm compilation #
Removed Breaking

Released: 2025-11-12

dart:js_util and package:js are no longer supported when compiling to WebAssembly. Invoking any API from these libraries will result in a runtime error. Usages should be migrated to dart:js_interop and dart:js_interop_unsafe.

Tools Wasm compilation #
Changed

Released: 2025-11-12

To match the JS compilers, dartify when compiled to Wasm, now converts JS Promise objects to Dart Future objects instead of Dart JSValue objects.

3.9

#
Tools Pub #
Fixed

Released: 2025-09-30

dart pub get --example now resolves example/ folders across the entire workspace, not only in the root package. This fixes an issue where flutter pub get could crash if examples had not been resolved before resolving the workspace.

Tools Development JavaScript compiler (DDC) #
Fixed

Released: 2025-09-09

This patch release fixes a performance regression in modular builds where static calls are deeply nested within a closure.

Tools Development JavaScript compiler (DDC) #
Fixed

Released: 2025-08-27

This patch release fixes an issue in DDC where static getters could be unintentionally invoked during a hot reload.

SDK DevTools, ARM32, git dependencies #
Changed

Released: 2025-08-20

This patch release fixes issues in DevTools, ARM32 compilation, and git dependencies using tag_pattern.

SDK Type promotion #
Changed

Released: 2025-08-13

Dart's type system now assumes null safety for type promotion, reachability, and definite assignment. The analysis server is now AOT compiled for improved performance. New lints switch_on_type and unnecessary_unawaited were added, along with a new @awaitNotRequired annotation.

Language Null safety #
Language versioned Changed

Released: 2025-08-13

Null safety is now assumed when computing type promotion, reachability, and definite assignment. As a result, improved dead code analysis might cause new analyzer diagnostics to trigger on existing code that previously passed analysis.

Tools Command line #
Changed

Released: 2025-08-13

Some subcommands of the dart tool, such as dart analyze and dart fix now run AOT-compiled snapshots of the underlying tools. There should be no functional difference outside of performance improvements, but if you come across incompatibilities, please report them.

Tools Pub #
Language versioned Fixed New

Released: 2025-08-13

The upper bound of the flutter SDK constraint in your workspace's root package is now respected. If your current SDK doesn't meet the specified bound, dart pub get and other actions that retrieve dependencies will fail.

Tools Dart build #
Experimental

Released: 2025-08-13

Building a CLI app bundle with experimental native asset support now requires using the dart build cli subcommand and specifying the app entrypoint with a new --target option.

3.8

#
SDK DevTools, Hot Restart #
Changed

Released: 2025-07-31

This patch release fixes issues with the DevTools Network screen and Hot Restart.

SDK Dart2Wasm #
Changed

Released: 2025-07-16

This patch release fixes an issue with the size of cross-compiled binaries.

SDK DDC #
Changed

Released: 2025-05-28

This patch release fixes an issue in DDC with late variables being incorrectly captured within async function bodies.

SDK Null-aware elements #
Changed

Released: 2025-05-20

Introduced null-aware elements for collections, making it easier to conditionally add elements based on nullability. Also added Iterable.withIterator, HttpClientBearerCredentials, and various analyzer improvements including new quick fixes and lints.

Language Collections #
New

Released: 2025-05-20

Added support for null-aware elements in collection literals. A null-aware element evaluates an expression and, if the result is not null, inserts the value into the surrounding collection.

Libraries dart:html #
Removed Breaking

Released: 2025-05-20

The Element.created constructor has been removed.

Libraries dart:html #
Deprecated

Released: 2025-05-20

Native classes in dart:html, such as HtmlElement, can no longer be extended.

Tools Analyzer #
Deprecated

Released: 2025-05-20

The avoid_null_checks_in_equality_operators lint rule is deprecated and should be removed from analysis_options.yaml files.

Tools Development JavaScript compiler #
Changed

Released: 2025-05-20

Now throws a runtime error when a redirecting factory constructor is torn off and one of its optional non-nullable parameters is provided no value. In the future this is likely to be a compile-time error.

Tools Production JavaScript compiler #
Experimental Removed Breaking

Released: 2025-05-20

The --experiment-new-rti and --use-old-rti flags are no longer supported.

Tools Formatter #
Language versioned Changed Fixed New

Released: 2025-05-20

The formatter builds on the previous release's rewrite, incorporating feedback, bug fixes, and further enhancements. It now intelligently automates trailing comma placement, deciding whether to split constructs rather than forcing them. The update also includes style changes to tighten and improve code output.

3.7

#
SDK Analysis server #
Changed

Released: 2025-04-16

This patch release fixes a performance regression in the analysis server.

SDK dart2wasm #
Changed

Released: 2025-03-12

This patch release fixes a bug in dart2wasm related to js-string builtin functions with non-nullable parameter types.

SDK DevTools, DDC, CFE #
Changed

Released: 2025-02-26

This patch release fixes bugs in the DevTools network profiler, DDC factory constructors with generic local functions, and wildcard variable marking in the CFE.

SDK Wildcard variables #
Changed

Released: 2025-02-12

Introduced wildcard variables, a new "tall" style for the dart formatter, and officially deprecated older web libraries in favor of package:web and dart:js_interop. Also implemented numerous analyzer improvements and new lints.

Language Wildcard variables #
Language versioned Changed New

Released: 2025-02-12

Wildcard variables are now supported. A wildcard variable is a local variable or parameter named _. Wildcard variables are non-binding, so they can be declared multiple times without collisions. For example:

dart
Foo(_, this._, super._, void _()) {}
Language Type promotion #
Changed

Released: 2025-02-12

Reachability analysis now accounts for if a field is type promoted to Null using is or as. This makes the type system more self-consistent, because it mirrors the behavior of promoted local variables. This change isn't expected to make any difference in practice.

Libraries Web libraries #
Deprecated

Released: 2025-02-12

The dart:html, dart:indexed:db, dart:svg, dart:web_audo, dart:web_gl, and dart:js libraries are officially deprecated. They are expected to be removed in a future release. Project should migrate to use package:web and dart:js_interop. To learn more, check out Migrate to package:web.

Libraries JS Interop #
Deprecated

Released: 2025-02-12

The dart:js, dart:js_util, and package:js libraries are officially deprecated. They are expected to be removed in a future release. Projects should migrate to use dart:js_interop. To learn more, check out JS interop usage.

Tools Analyzer #
Removed Breaking

Released: 2025-02-12

The package_api_docs and unsafe_html lint rules have been removed and should be removed from analysis_options.yaml files.

Tools Formatter #
Language versioned Changed

Released: 2025-02-12

The dart format command is now tied to the language version as of 3.7. If the language version of an input file is 3.7 or later, the code is formatted with the new tall style.

The new style looks similar to the style you get when you add trailing commas to argument lists, except that now the formatter will add and remove those commas for you. When an argument or parameter lists splits, it is formatted like so:

dart
longFunction(
  longArgument,
  anotherLongArgument,
);
Tools Formatter #
Removed Breaking

Released: 2025-02-12

The --fix flag for dart format is no longer supported. To apply similar fixes and more, configure your analysis options and run dart fix.

Tools Formatter #
Deprecated

Released: 2025-02-12

The --line-length option for dart format has been deprecated and set to be removed. All usages should be migrated to the new --page-width option.

3.6

#
SDK HttpServer, Dart Format, DevTools, Dart Fix #
Changed

Released: 2025-01-30

This patch release fixes bugs in HttpServer response encoding, dart format parsing of digit separators, DevTools analytics, and dart fix application.

SDK Pub get, dart2wasm, analysis options #
Changed

Released: 2025-01-08

This patch release fixes issues with pub get in workspaces, AOT/dart2wasm compilation crashes, and analysis options discovery in workspaces.

SDK Digit separators #
Changed

Released: 2024-12-11

Introduced digit separators for number literals, improved throw expression type inference, and added support for pub workspaces. Also added new JSArray constructors and methods in dart:js_interop, and several new lints and assists.

Language Digit separators #
New

Released: 2024-12-11

Added support for digit separator underscores (_) to the language. Digit separators improve readability of long number literals.

dart
var m = 1__000_000__000_000__000_000;
Language Type inference #
Changed

Released: 2024-12-11

The context used by Dart to perform type inference on the operand of a throw expression has been changed from the "unknown type" to Object. This makes the type system more self-consistent, because it reflects the fact that it's not legal to throw null. This change isn't expected to make any difference in practice.

Libraries dart:io #
Removed Breaking

Released: 2024-12-11

The Platform() constructor has been removed. All instantiations of Platform should be removed.

Libraries dart:io #
Changed

Released: 2024-12-11

HttpClient now responds to a redirect that's missing a "Location" header by throwing a RedirectException instead of a StateError.

Tools Analyzer #
Deprecated

Released: 2024-12-11

The package_api_docs and unsafe_html lint rules have been deprecated and are set to be removed in Dart 3.7.

Tools Compiler front end #
Changed

Released: 2024-12-11

The Dart compiler now computes the upper and lower closures of type schemas just before they're passed into the subtype testing procedure. Before Dart 3.6, the compiler computed them at the very beginning of the upper and lower-bound computations. The analyzer already followed this behavior, so apps that already pass analysis are unlikely to be affected by this change.

Tools Wasm compiler #
Changed

Released: 2024-12-11

The condition dart.library.js is now false on conditional imports when compiling to WebAssembly. The dart.library.js_interop condition should be used instead.

Tools Formatter #
Changed

Released: 2024-12-11

The following changes might result in small formatting changes when running dart format with a Dart 3.6 SDK or later:

Tools Formatter #
Changed

Released: 2024-12-11

Preserve type parameters on old-style function-typed formals that also use this. or super..

Tools Formatter #
Fixed

Released: 2024-12-11

Correctly format imports with both as and if clauses.

Tools Pub #
Changed

Released: 2024-12-11

dart pub publish now warns if files that are tracked in git have uncommitted changes.

3.5

#
SDK DevTools #
Changed

Released: 2024-09-11

This patch release fixes issues with DevTools memory tool OOMs, missing tab bars in IntelliJ/Android Studio, and persistent release notes.

SDK Dart VM #
Changed

Released: 2024-08-28

This patch release fixes bugs in ZLibDecoder, running dart from PATH, and analysis server context roots in multi-package workspaces.

SDK Dart2Wasm #
Changed

Released: 2024-08-14

This patch release fixes issues with include: in analysis_options.yaml, wasm source maps, and several dart2wasm compiler bugs.

SDK Sound null safety only #
Changed

Released: 2024-08-06

Aligned type inference for await and if-null expressions with the analyzer. Also updated dart:core DateTime on web to store microseconds, made SecurityContext final, and removed unsound null safety support in the VM.

Language Type inference #
Changed New

Released: 2024-08-06

When the context for an await expression is dynamic, the context for the operand of expression is now FutureOr<_>. This has been changed to match the behavior of the analyzer.

Language Type inference #
Changed New

Released: 2024-08-06

When the context for an entire if-null expression (e1 ?? e2) is dynamic, the context for e2 is now the static type of e1. This has been changed to match the behavior of the analyzer. The old behavior can be restored by supplying explicit types.

Libraries dart:core #
Changed

Released: 2024-08-06

DateTime now stores microseconds on the web platform, more closely matching the behavior on native platforms.

Libraries dart:io #
Changed

Released: 2024-08-06

SecurityContext is now final and can no longer be subclassed.

Libraries dart:js_interop #
Changed

Released: 2024-08-06

importModule now accepts a JSAny instead of a String to support other JS values as well, such as TrustedScriptURL objects.

Libraries dart:js_interop #
Changed

Released: 2024-08-06

isTruthy and not now return JSBoolean instead of bool to be consistent with other JS operator methods.

Libraries dart:js_interop #
Changed

Released: 2024-08-06

ExternalDartReference no longer implements Object. Instead, it now accepts a type parameter (T) with a bound of Object? to capture the type of the Dart object that is externalized.

Libraries dart:typed_data #
Removed Breaking

Released: 2024-08-06

The unmodifiable view classes for typed data have been removed. Instead of using the constructors of these classes, use the new asUnmodifiableView methods on typed data lists.

Dart Runtime Sound null safety only #
Removed Breaking

Released: 2024-08-06

The Dart VM no longer supports unsound null safety.

  • The --no-sound-null-safety CLI option has been removed.
  • The Dart_NewListOf and Dart_IsLegacyType functions have been removed from the C API.
Dart Runtime C API #
Removed Breaking

Released: 2024-08-06

The Dart_DefaultCanonicalizeUrl function has been removed from the C API.

3.4

#
SDK Dart2Wasm #
Changed

Released: 2024-06-12

This patch release fixes issues with pub advisory fetching, dart.library.ffi conditional imports in dart2wasm, and variadic arguments on MacOS Arm64 FFI.

SDK Dart2Wasm #
Changed

Released: 2024-06-05

This patch release fixes bugs in dart compile exe DART_VM_OPTIONS parsing, dart2wasm array.new_fixed() limits, and adds --enable-experiment support to dart2wasm.

SDK Dart2Wasm #
Changed

Released: 2024-05-29

This patch release marks dart compile wasm as stable. It also fixes bugs in dart2wasm exception handling, this restoration in async functions, and implements missing control flow constructs.

SDK CFE #
Changed

Released: 2024-05-22

This patch release fixes a CFE bug affecting Flutter web apps compiled with dart2wasm and a pub client bug interfering with Flutter l10n.

SDK Type analysis #
Changed

Released: 2024-05-14

Improved type analysis for conditional expressions, if-null, and switch expressions. Also added ExternalDartReference to dart:js_interop, deprecated unmodifiable typed data views, and removed waitFor from dart:cli.

Language Type analysis #
Changed

Released: 2024-05-14

Added improvements to the type analysis of conditional expressions, if-null expressions and assignments, and switch expressions.

Language Patterns #
Changed

Released: 2024-05-14

The pattern context type schema for cast patterns is now _ (the unknown type) instead of Object?.

Language Type inference #
Changed

Released: 2024-05-14

The type schema used by the Dart compilers to perform type inference on the operand of a null-aware spread operator (...?) in map and set literals has been made nullable, to match what currently happens in list literals.

Libraries dart:cli #
Experimental Removed Breaking

Released: 2024-05-14

The waitFor function has been removed.

Libraries dart:html, dart:indexed:db, dart:svg, dart:web_audo, dart:web_gl #
Deprecated

Released: 2024-05-14

These libraries are now marked as legacy and will see less support in the future. New projects should prefer to use package:web and dart:js_interop. To learn more, check out Migrate to package:web.

Libraries dart:js #
Deprecated

Released: 2024-05-14

This library is now marked as legacy and will see less support in the future. Usages should be migrated to dart:js_interop and dart:js_interop_unsafe. To learn more, check out /go/next-gen-js-interop.

Libraries dart:js_util #
Deprecated

Released: 2024-05-14

This library is now marked as legacy and will see less support in the future. Usages should be migrated to dart:js_interop and dart:js_interop_unsafe. To learn more, check out /go/next-gen-js-interop.

Libraries dart:io #
New Changed

Released: 2024-05-14

Stdout has a new field lineTerminator, which allows developers to control the line ending used by stdout and stderr. Classes that implement Stdout must define the lineTerminator field. The default semantics of stdout and stderr are not changed.

Libraries dart:io #
Deprecated

Released: 2024-05-14

The FileSystemDeleteEvent.isDirectory property. It always returns false.

Libraries dart:typed_data #
Deprecated

Released: 2024-05-14

The unmodifiable view classes for typed data are deprecated. Instead of using the constructors of these classes, use the new asUnmodifiableView methods on typed data lists.

Tools Production JavaScript compiler #
Experimental Deprecated

Released: 2024-05-14

You should now specify a format to the --dump-info CLI option of either binary or json. The json format is deprecated and might be removed in a future Dart release.

Tools Wasm compiler #
Experimental

Released: 2024-05-14

Various dart compile wasm CLI arguments have been updated, removed, or replaced. To learn more, run dart compile wasm --verbose --help.

Dart Runtime Dart VM #
Removed Breaking

Released: 2024-05-14

The Dart VM no longer supports external strings. As a result, the Dart_IsExternalString, Dart_NewExternalLatin1String, and Dart_NewExternalUTF16String functions have been removed from the Dart C API.

3.3

#
SDK Dart2Wasm #
Changed

Released: 2024-04-17

This patch release fixes an issue with JS interop in dart2wasm where @JS annotations on enclosing libraries were incorrectly used.

SDK Dart VM #
Changed

Released: 2024-03-27

This patch release fixes a Dart VM crash on older Windows CPUs lacking SSE4.1.

SDK CFE #
Changed

Released: 2024-03-20

This patch release fixes bugs in the CFE related to incremental compilation crashes and redirecting factories in extension types, and a VM issue with DateTime.timeZoneName on Windows.

SDK Dart2js #
Changed

Released: 2024-03-06

This patch release fixes a dart2js issue with object literal constructors in interop extension types and disallows certain extension types in await expressions.

SDK Extension types #
Changed

Released: 2024-02-15

Introduced extension types for zero-cost wrappers, improved private field promotion, and added new features to dart:ffi and dart:js_interop, including Native.addressOf and importModule.

SDK Experiments #
Experimental Removed Breaking

Released: 2024-02-15

The following experiments are now retired as they were released in Dart 3 and are no longer necessary with a language version of 3.0 or greater. Configuration of them should be removed from analysis options, CLI commands, and IDE configurations.

  • patterns
  • records
  • class-modifers
  • sealed-class
Language Extension types #
New

Released: 2024-02-15

Added support for extension types. Extension types are a new feature in Dart that allow zero-cost wrapping of an existing type. They are similar to wrapper classes and extension methods, but with implementation differences and different tradeoffs.

dart
extension type Meters(int value) {
  String get label => '${value}m';
  Meters operator +(Meters other) => Meters(value + other.value);
}
​
void main() {
  var m = Meters(42); // Has type `Meters`.
  var m2 = m + m; // OK, type `Meters`.
  // int i = m; // Compile-time error, wrong type.
  // m.isEven; // Compile-time error, no such member.
  assert(identical(m, m.value)); // Succeeds.
}
Language Private field promotion #
Changed

Released: 2024-02-15

Abstract getters are now promotable under the rules of private final field promotion, if there are no conflicting declarations.

Libraries dart:cli #
Experimental Deprecated

Released: 2024-02-15

The waitFor function remains deprecated for another release and is set for removal in Dart 3.4.

Libraries dart:ffi #
Deprecated

Released: 2024-02-15

The elementAt pointer arithmetic methods on Pointer types are deprecated. Migrate to the - and + operators instead.

Libraries dart:ffi #
Experimental Removed Breaking

Released: 2024-02-15

The previously deprecated @FfiNative annotation has been removed. Usages should be updated to use the @Native annotation.

Libraries dart:html #
Changed

Released: 2024-02-15

Instead of using HttpRequest directly, it is now recommended to use package:http.

Libraries dart:io #
Changed

Released: 2024-02-15

Instead of using HttpClient directly, it is now recommended to use package:http.

Libraries dart:js_interop #
Experimental

Released: 2024-02-15

JS types like JSAny have new compiler-specific representation types.

Libraries dart:js_interop #
Experimental

Released: 2024-02-15

User-defined @staticInterop classes can no longer implement JSAny or JSObject. Usages should be migrated to JSObject.fromInteropObject or be defined as extension types.

Libraries dart:js_interop #
Experimental

Released: 2024-02-15

JSArray and JSPromise now have generic parameters.

Libraries dart:js_interop #
Experimental

Released: 2024-02-15

Various extension members were moved or renamed. To learn about the updated extensions, reference JSAnyUtilityExtension and JSAnyOperatorExtension.

Libraries dart:typed_data #
Deprecated New

Released: 2024-02-15

The unmodifiable view classes for typed data will be deprecated in Dart 3.4. Instead of using the constructors of these classes, use the new asUnmodifiableView methods on typed data lists.

Libraries dart:nativewrappers #
Experimental

Released: 2024-02-15

All native wrapper classes are now marked base so that none of their subtypes can be implemented.

Tools Production JavaScript compiler #
Deprecated

Released: 2024-02-15

The Invocation that is passed to noSuchMethod no longer has a minified memberName, even when compiled with --minify.

Tools Wasm compiler #
Experimental

Released: 2024-02-15

Disallow importing legacy JS interop libraries. Prefer using dart:js_interop and dart:js_interop_unsafe instead.

Tools Analyzer #
Experimental

Released: 2024-02-15

Invalid dart doc comment directives are now reported by the analyzer.

Tools Analyzer #
Changed

Released: 2024-02-15

Due to improvements in type promotion, the following analyzer diagnostics might trigger on existing code that previously passed analysis:

  • unnecessary_non_null_assertion
  • unnecessary_cast
  • invalid_null_aware_operator
Tools Linter #
Removed Breaking

Released: 2024-02-15

The iterable_contains_unrelated_type and list_remove_unrelated_type lints were removed. Consider migrating to the expanded collection_methods_unrelated_type lint.

Tools Linter #
Removed Breaking

Released: 2024-02-15

The following lints are removed due to no longer being necessary with sound null safety. You should remove configuration of them from your analysis_options.yaml files and any ignore comments.

  • always_require_non_null_named_parameters
  • avoid_returning_null
  • avoid_returning_null_for_future

3.2

#
SDK Dart VM #
Changed

Released: 2023-12-06

This patch release fixes issues with final fields in constant contexts, upgrades DevTools, and fixes AOT snapshot crashes on certain ARM/x86-64 CPUs.

SDK Analyzer #
Changed

Released: 2023-11-29

This patch release adjusts nullability computations in the upper bound algorithm and fixes missing closure code completion in LSP-based editors.

SDK Dart doc #
Changed

Released: 2023-11-22

This patch release fixes bugs in dart doc generation, JSON array parsing causing segfaults in flutter test, and upgrades DevTools.

SDK Private field promotion #
Changed

Released: 2023-11-15

Introduced private field promotion, allowing private final fields to be promoted to non-nullable types. Also included breaking changes to refutable patterns split points, disabled waitFor by default, and changed utf8.encode return type to Uint8List.

Language Private field promotion #
New

Released: 2023-11-15

Expanded type promotion to work on private final fields. Previously only available for local variables and parameters, now private final fields can promote to non-nullable types through null checks and is tests. For example, the following code is now sound:

dart
class Example {
  final int? _privateField;
​
  Example(this._privateField);
​
  void f() {
    if (_privateField != null) {
      // _privateField has now been promoted; you can use it without
      // null checking it.
      int i = _privateField; // OK
    }
  }
}
​
// Private field promotions also work from outside of the class:
void f(Example x) {
  if (x._privateField != null) {
    int i = x._privateField; // OK
  }
}

For more information on when private final fields can and can't promote, check out Fixing type promotion failures.

Language Type promotion #
Language versioned Fixed

Released: 2023-11-15

Corrected inconsistencies in type promotion behavior of if-case statements where the value being matched against throws an exception.

Language Patterns #
Language versioned Fixed

Released: 2023-11-15

Changed the split point for refutable patterns to the top level pattern so type promotion in if-case statements is consistent regardless of whether the scrutinee might throw an exception.

Libraries dart:cli #
Experimental Deprecated

Released: 2023-11-15

Deprecated the waitFor function.

Libraries dart:convert #
Changed

Released: 2023-11-15

Changed return types of utf8.encode() and Utf8Codec.encode() from List<int> to Uint8List.

Libraries dart:developer #
Deprecated

Released: 2023-11-15

Deprecated the Service.getIsolateID method.

Libraries dart:ffi #
Changed

Released: 2023-11-15

Changed NativeCallable.nativeFunction so calls now throw an error if the receiver is already closed, instead of returning nullptr.

Libraries dart:io #
Changed

Released: 2023-11-15

Eliminated trailing whitespace from HTTP headers.

Libraries dart:io #
Changed

Released: 2023-11-15

Inserted a space at the fold point of folded header values that HttpClientResponse.headers and HttpRequest.headers return.

Libraries dart:js_interop #
Experimental Removed Breaking

Released: 2023-11-15

JSNumber.toDart in favor of toDartDouble and toDartInt.

Libraries dart:js_interop #
Experimental Removed Breaking

Released: 2023-11-15

Object.toJS in favor of Object.toJSBox.

Libraries dart:js_interop #
Changed Experimental

Released: 2023-11-15

Restricted external JS interop APIs using dart:js_interop to a set of allowed types.

Libraries dart:js_interop #
Changed Experimental

Released: 2023-11-15

Prohibited use of isNull and isUndefined on dart2wasm.

Libraries dart:js_interop #
Changed Experimental

Released: 2023-11-15

Changed typeofEquals and instanceof APIs to both return bool instead of JSBoolean. Also, typeofEquals now takes String instead of JSString.

Libraries dart:js_interop #
Changed Experimental

Released: 2023-11-15

Changed JSAny and JSObject types to only implementable, not extendable, by user @staticInterop types.

Libraries dart:js_interop #
Changed Experimental

Released: 2023-11-15

Changed JSArray.withLength to take int instead of JSNumber.

Tools Development JavaScript compiler #
New

Released: 2023-11-15

Added interceptors for JavaScript Symbol and BigInt types; they should no longer be used with package:js classes.

Tools Production JavaScript compiler #
New

Released: 2023-11-15

Added interceptors for JavaScript Symbol and BigInt types; they should no longer be used with package:js classes.

Tools Analyzer #
Language versioned Changed

Released: 2023-11-15

Private final field promotion might cause the following analyzer warnings to trigger on existing code that previously passed analysis:

dart
class C {
  final num? _x = null;
  void test() {
    if (_x != null) {
      print(_x! * 2); // unnecessary_non_null_assertion
      print(_x?.abs()); // invalid_null_aware_operator
    }
    if (_x is int) {
      print((_x as int).bitLength); // unnecessary_cast
    }
  }
}

3.1

#
SDK Dart2js #
Changed

Released: 2023-10-25

This patch release fixes an issue affecting Dart compiled to JavaScript running in Node.js 21.

SDK Dart VM #
Changed

Released: 2023-10-18

This patch release fixes a Dart VM issue where variable values were not visible while debugging.

SDK Dart2js #
Changed

Released: 2023-09-27

This patch release fixes a dart2js crash with @staticInterop factories, avoids symbol conflicts in the standalone VM, and fixes slow variable access during debugging.

SDK Dart2js #
Changed

Released: 2023-09-13

This patch release fixes a dart2js crash with typed record patterns in field initializers and fixes unhandled exception pauses in the debugger.

SDK Parser #
Changed

Released: 2023-09-07

This patch release fixes a parser bug that prevented nested record patterns from using destructuring shorthand syntax.

SDK dart:async, dart:io #
Changed

Released: 2023-08-16

Added breaking changes to dart:async and dart:io class modifiers, introduced NativeCallable for FFI, and made various updates to dart:core and dart:js_interop.

Libraries dart:async #
New

Released: 2023-08-16

Added interface modifier to purely abstract classes: MultiStreamController, StreamConsumer, StreamIterator and StreamTransformer.

Libraries dart:io #
New

Released: 2023-08-16

Added sameSite to the Cookie class, and added the class SameSite.

Libraries dart:io #
Deprecated

Released: 2023-08-16

FileSystemEvent is sealed. This means FileSystemEvent cannot be extended or implemented.

Libraries dart:js_interop #
Experimental Removed Breaking

Released: 2023-08-16

ObjectLiteral; create an object literal with no named members using {}.jsify().

Libraries package:js #
Deprecated

Released: 2023-08-16

external @staticInterop members and external extension members can no longer be used as tear-offs. Declare a closure or a non-external method that calls these members, and use that instead.

Libraries package:js #
Deprecated

Released: 2023-08-16

external @staticInterop members and external extension members will generate slightly different JS code for methods that have optional parameters.

3.0

#
SDK Dart2js #
Changed

Released: 2023-07-26

This patch release fixes a dart2js bug causing TypeError or NoSuchMethodError when using records.

SDK Analyzer #
Changed

Released: 2023-07-12

This patch release fixes issues with flow analysis, infinite loops in web compiles involving records, and memory leaks in the analyzer.

SDK Frontend #
Changed

Released: 2023-06-14

This patch release fixes a bad cast in the frontend causing dart2js crashes during Flutter web builds.

SDK Dart format #
Changed

Released: 2023-06-07

This patch release fixes dart format for nullable record types with no fields and errors when using records in web development mode.

SDK Frontend #
Changed

Released: 2023-02-07

This patch release fixes AOT compiler crashes, pattern matching issues, adds missing interface modifiers, and improves linter support.

SDK Dart2js #
Changed

Released: 2023-05-24

This patch release fixes dart2js crashes with switch expressions on records, adds class modifier chips to dart doc, and fixes parser infinite loops.

SDK Compiler #
Changed

Released: 2023-05-17

This patch release fixes compiler crashes with redirecting factories and FFI, dart2js crashes with local functions and records, and various other bugs.

SDK Dart 3 #
Changed

Released: 2023-05-10

Introduced major language features including records, patterns, class modifiers, and 100% sound null safety. Also made many other improvements and breaking changes across the platform.

Language Patterns #
New

Released: 2023-05-10

Added support for patterns, a new category of grammar that lets you match and destructure values.

Language Records #
New

Released: 2023-05-10

Added support for records, a new type that lets you aggregate multiple values of different types in a single function return.

Language Class modifiers #
New

Released: 2023-05-10

Added support for class modifiers, a new set of keywords that let you control how a class or mixin can be used.

Language Switch expressions #
New

Released: 2023-05-10

Added support for switch expressions, a new form of multi-way branching allowed where expressions are expected.

Language Patterns #
New

Released: 2023-05-10

Added support for if-case clauses, a new conditional construct that matches a value against a pattern and executes the then or else branch, depending on whether the pattern matches.

Language Patterns #
Language versioned Changed

Released: 2023-05-10

Changed interpretation of switch cases from constant expressions to patterns.

Language Class modifiers #
Language versioned Changed Breaking

Released: 2023-05-10

Class declarations from libraries that have been upgraded to Dart 3.0 can no longer be used as mixins by default.

Language Named parameters #
Language versioned Changed Breaking

Released: 2023-05-10

It is now a compile time error if a colon (:) is used as the separator before the default value of an optional named parameter. Use an equal sign (=) instead.

Language Control flow #
Changed Breaking

Released: 2023-05-10

It is now a compile-time error if a continue statement targets a label that is not attached to a loop statement (for, do, and while) or a switch member.

Libraries #
Changed

Released: 2023-05-10

The following existing classes have been made mixin classes: Iterable, IterableMixin, IterableBase, ListMixin, SetMixin, MapMixin, LinkedListEntry, StringConversionSink.

Libraries dart:async #
Removed Breaking

Released: 2023-05-10

The following APIs have been removed:

dart:core + onError argument removed from int.parse, double.parse, and num.parse. + Deprecated.expires (use Deprecated.message instead).

  • proxy, Provisional, BidirectionalIterator classes and constants. + There errors were removed: AbstractClassInstantiationError, CyclicInitializationError, NullThrownError, FallThroughError, CastError (use TypeError), NoSuchMethodError default constructor (use NoSuchMethod.withInvocation).

dart:async + DeferredLibrary (use the import ... deferred as ... syntax instead).

dart:developer + MAX_USER_TAGS removed from UserTag.

dart:html + document.registerElement and registerElement2

Libraries dart:core #
Deprecated

Released: 2023-05-10

List constructor: Deprecated in favor of List.filled.

Libraries dart:async #
Removed Breaking

Released: 2023-05-10

Removed the deprecated DeferredLibrary class.

Libraries dart:collection #
Language versioned Changed

Released: 2023-05-10

Changes to platform libraries.

Libraries dart:developer #
Removed Breaking

Released: 2023-05-10

Removed the deprecated MAX_USER_TAGS constant. Use maxUserTags instead.

Libraries dart:developer #
Removed Breaking

Released: 2023-05-10

Removed the deprecated Metrics and Metric classes as they have been broken since Dart 2.0.

Libraries dart:developer #
Removed Breaking

Released: 2023-05-10

Removed the deprecated Counter class as it has been broken since Dart 2.0.

Libraries dart:developer #
Removed Breaking

Released: 2023-05-10

Removed the deprecated Gauge class as it has been broken since Dart 2.0.

Libraries dart:ffi #
Experimental Deprecated

Released: 2023-05-10

The @FfiNative annotation is now deprecated. Usages should be updated to use the @Native annotation.

Libraries dart:html #
Removed Breaking

Released: 2023-05-10

Removed the deprecated registerElement and registerElement2 methods in Document and HtmlDocument.

Libraries dart:math #
Language versioned Deprecated

Released: 2023-05-10

The Random interface can only be implemented, not extended.

Libraries dart:io #
New Changed

Released: 2023-05-10

Updated NetworkProfiling to accommodate new String ids that are introduced in vm_service:11.0.0

Language Language versioning #
Removed Breaking

Released: 2023-05-10

The 3.0 release of the Dart SDK dropped support for language versions before 2.12.

2.19

#
SDK VM #
Changed

Released: 2023-03-29

This patch release fixes a Dart VM crash when reading a defined but uninitialized static field.

SDK FFI #
Changed

Released: 2023-03-22

This patch release fixes broken usage of Dart_CObject_Type.

SDK VM #
Changed

Released: 2023-03-08

This patch release fixes VM crashes on mobile devices caused by specific RegExp usage.

SDK Analysis server #
Changed

Released: 2023-03-01

This patch release updates DDC configuration and limits the number of plugins per analysis context to prevent extreme memory usage in the Analysis Server.

SDK VM #
Changed

Released: 2023-02-08

This patch release fixes VM crashes with mixed double/float calculations, compiler crashes when inlining methods with many optional parameters, and part_of_different_library errors in PackageBuildWorkspace.

SDK Pub #
Changed

Released: 2023-02-01

This patch release fixes pub get behavior with older lockfiles, stops rewriting SDK constraints, and fixes a VM crash caused by incorrect RegExp sharing between isolates.

SDK Unnamed libraries #
Changed

Released: 2023-01-24

Introduced support for unnamed libraries, improved flow analysis for unreachable code, and reported compile-time errors for cyclic dependencies during top-level type inference.

Language Unnamed libraries #
New

Released: 2023-01-25

Added support for unnamed libraries. Library directives, used for appending library-level doc comments and annotations, can and should now be written without a name:

dart
/// A really great test library.
@TestOn('browser')
library;
Language Flow analysis #
Changed

Released: 2023-01-25

Added more flow analysis flags for unreachable code cases.

Language Flow analysis #
Changed

Released: 2023-01-25

Flagged additional code as unreachable due to types Null and Never.

Language Private names #
Changed

Released: 2023-01-25

Don't delegate inaccessible private names to noSuchMethod.

Language Type inference #
Changed

Released: 2023-01-25

Report a compile-time error for all cyclic dependencies during top-level type inference.

Libraries dart:convert #
Removed Breaking

Released: 2023-01-25

The previously deprecated API DEFAULT_BUFFER_SIZE in JsonUtf8Encoder has been removed.

Libraries dart:developer #
Removed Breaking

Released: 2023-01-25

Removed previously deprecated APIs kInvalidParams, kExtensionError, kExtensionErrorMax, and kExtensionErrorMin in ServiceExtensionResponse.

Libraries dart:ffi #
Changed

Released: 2023-01-25

Changed the runtime type argument of Pointer to Never in preparation of completely removing the runtime type argument. Changed Pointer.toString to not report any type argument.

Libraries dart:io #
Changed

Released: 2023-01-25

Disallow negative or hexadecimal content-length headers.

Libraries dart:io #
New Changed

Released: 2023-01-25

File.create now takes new optional exclusive bool parameter, and when it is true the operation will fail if target file already exists.

Libraries dart:io #
Changed

Released: 2023-01-25

Calling ResourceHandle.toFile(), ResourceHandle.toSocket(), ResourceHandle.toRawSocket() or ResourceHandle.toRawDatagramSocket(), more than once now throws a StateError.

Libraries dart:isolate #
Changed

Released: 2023-01-25

Reverted SendPort.send back to strict checks on contents of messages when sending messages between isolates that are not known to share the same code.

Libraries dart:mirrors #
Removed Breaking

Released: 2023-01-25

Removed APIs MirrorsUsed and Comment.

Libraries package:js #
Changed Deprecated

Released: 2023-01-25

Breaking changes to the preview feature @staticInterop:

  • Disallowed classes with this annotation from using external generative constructors. See 48730 and 49941 for more details.
  • Disallowed classes with this annotation's external extension members from using type parameters.
  • Classes with this annotation should also have the @JS annotation.
  • Classes with this annotation can not be implemented by classes without this annotation.
Libraries dart2js #
Deprecated

Released: 2023-01-25

dart2js no longer supports HTTP URIs as inputs.

2.18

#
SDK Variables #
Changed

Released: 2022-11-23

This patch release fixes issues with private variable setters in mixins on web and type parameter nullability in factory constructors.

SDK Hot reload #
Changed

Released: 2022-11-02

This patch release fixes crashes during hot reload.

SDK Code coverage #
Changed

Released: 2022-10-19

This patch release fixes a regression in code coverage computation.

SDK Uri #
Changed

Released: 2022-09-28

This patch release fixes incorrect behavior in Uri.parse and a compiler crash.

SDK Type inference #
Changed

Released: 2022-09-14

This patch release fixes a crash caused by incorrect type inference.

SDK Type inference #
Changed

Released: 2022-08-30

Enhanced type inference for generic invocations with function literals, introduced breaking changes in dart:io networking APIs, and removed standalone tools like dart2js and dartanalyzer.

Language Type inference #
New

Released: 2022-08-30

Enhanced type inference. This change allows information flow between arguments in generic function calls. Before 2.18, if you didn't specify an argument's type in some methods, Dart reported errors. These type errors cited potential null occurrences. With 2.18, the compiler infers the argument type from other values in an invocation. You don't need to specify the argument type inline.

Language Mixins #
Removed Breaking

Released: 2022-08-30

Removed support for mixin of classes that don't extend Object.

Libraries dart:io #
Changed

Released: 2022-08-30

Changed the uri property of RedirectException in dart:io to be nullable.

Libraries dart:io #
Removed Breaking

Released: 2022-08-30

Removed constants in dart:io networking APIs following the SCREAMING_CAPS convention.

Libraries dart:io #
Deprecated

Released: 2022-08-30

The Dart VM no longer automatically restores the initial terminal settings upon exit.

Tools #
Removed Breaking

Released: 2022-08-30

Fully discontinued the .packages file.

Tools Dart command line #
Removed Breaking

Released: 2022-08-30

Removed the standalone dart2js and dartdevc tools.

Tools Dart command line #
Removed Breaking

Released: 2022-08-30

Removed the standalone dartanalyzer tool.

2.17

#
SDK Debugger #
Changed

Released: 2022-08-24

This patch release fixes a crash in the debugger.

SDK Flutter #
Changed

Released: 2022-07-13

This patch release improves code completion for Flutter, fixes a crash on ARM, and fixes a compiler crash with Finalizable parameters.

SDK Analyzer #
Changed

Released: 2022-06-22

This patch release improves analysis of enums and switch statements, and fixes a compiler crash when initializing Finalizable objects.

SDK Dart VM #
Changed

Released: 2022-06-01

This patch release fixes a Dart VM compiler crash, code completion for method overrides, dart pub login, and analysis of enhanced enums.

SDK Analyzer #
Changed

Released: 2022-05-18

This patch release fixes an analyzer plugin crash, FFI support for late Finalizable variables, and dart compile on macOS 10.15.

SDK Enhanced enums #
Changed

Released: 2022-05-11

Introduced enhanced enums with members, super-initializer parameters, named arguments anywhere, and updates to dart:core and dart:ffi.

Language Enhanced enums #
New

Released: 2022-05-11

Added support for enhanced enums with members. Enhanced enums allow enum declarations to define members including fields, constructors, methods, getters, etc.

Language Super parameters #
New

Released: 2022-05-11

Added support for super-initializer parameters. Super parameters allow you to avoid having to manually pass each parameter into the super invocation of a non-redirecting constructor. You can instead use super parameters to forward parameters to a superclass constructor.

Language Named parameters #
New

Released: 2022-05-11

Added support for named arguments anywhere. Named arguments can now be freely interleaved with positional arguments. You can write the following code:

dart
void main() {
  test(skip: true, 'A test description', () {
    // Very long function body here...
  });
}
Libraries dart:io #
New

Released: 2022-05-11

Added new connectionFactory property to HttpClient.

Libraries dart:io #
Fixed New

Released: 2022-05-11

Added new keyLog property to HttpClient, which allows TLS keys to be logged for debugging purposes.

Libraries dart:io #
Removed Breaking

Released: 2022-05-11

Removed constants in dart:io following the SCREAMING_CAPS

Libraries dart:io #
New

Released: 2022-05-11

Added a new allowLegacyUnsafeRenegotiation property to SecurityContext, which allows TLS renegotiation for client secure sockets.

Tools Dart command line #
Deprecated

Released: 2022-05-11

Deprecated the standalone dart2js tool.

Tools Dart command line #
Deprecated

Released: 2022-05-11

Deprecated the standalone dartdevc tool.

Tools Dart command line #
Removed Breaking

Released: 2022-05-11

Removed the standalone dartdoc tool.

2.16

#
SDK Flutter web #
Changed

Released: 2022-03-24

This patch release fixes a dart2js crash when building some Flutter web apps.

SDK Flutter AOT #
Changed

Released: 2022-02-09

This patch release fixes an AOT precompiler crash when building some Flutter apps.

SDK Tooling updates #
Changed

Released: 2022-02-03

Added Error.throwWithStackTrace, Abi specific integers in FFI, improved dart pub with concurrency and new commands, and deprecated standalone tools in favor of dart commands.

Libraries dart:io #
New

Released: 2022-02-03

On Windows, Directory.rename will no longer delete a directory if newPath specifies one. Instead, a FileSystemException will be thrown.

Libraries dart:io #
Removed Breaking

Released: 2022-02-03

Removed the Platform.packageRoot API.

Libraries dart:isolate #
Removed Breaking

Released: 2022-02-03

Removed the Isolate.packageRoot API.

Tools Dart command line #
Deprecated

Released: 2022-02-03

Deprecated the standalone dartanalyzer tool.

Tools Dart command line #
Deprecated

Released: 2022-02-03

Deprecated the standalone dartdoc tool.

Tools Dart command line #
Removed Breaking

Released: 2022-02-03

Removed the deprecated standalone pub tool.

2.15

#
SDK Flutter AOT #
Changed

Released: 2021-12-14

This patch release fixes an AOT compilation failure in some Flutter apps and issues with dart pub publish for servers with a path in the URL.

SDK Constructor tear-offs #
Changed

Released: 2021-12-08

Introduced constructor tear-offs, generic type literals, explicit generic method instantiations, and improvements to dart:core enums and developer tools.

Language Constructor tear-offs #
New

Released: 2021-12-08

Improved support for function pointers, known as tear-offs. In particular, constructor tear-offs are now supported.

Libraries dart:io #
Changed

Released: 2021-12-08

Updated the SecurityContext class to set the minimum TLS protocol version to TLS1_2_VERSION (1.2) instead of TLS1_VERSION.

Libraries dart:web_sql #
Removed Breaking

Released: 2021-12-08

Completely deleted the dart:web_sql library.

Libraries dart:html #
Removed Breaking

Released: 2021-12-08

Removed window.openDatabase (related to dart:web_sql deletion above).

Tools Dart command line #
Removed Breaking

Released: 2021-12-08

Removed the standalone dart2native tool.

Tools Dart command line #
Removed Breaking

Released: 2021-12-08

Removed the standalone dartfmt tool.

Tools Dart VM #
Removed Breaking

Released: 2021-12-08

Removed support for dart-ext:-style native extensions

Tools Dart VM #
Changed

Released: 2021-12-08

Grouped isolates spawned via the Isolate.spawn() API to operate on the same managed heap, and therefore share various VM-internal data structures.

2.14

#
SDK Analyzer #
Changed

Released: 2021-10-14

This patch release fixes a memory leak of analyzer plugins and issues with Dart VM loading expired certificates on Windows.

SDK Performance #
Changed

Released: 2021-09-30

This patch release fixes a code completion performance regression and debug information emitted by the Dart VM.

SDK Dartdoc #
Changed

Released: 2021-09-16

This patch release fixes dartdoc crashes, error messages for >>> on older language versions, and invalid pubspec.lock paths on Windows.

SDK Performance #
Changed

Released: 2021-09-09

This patch release fixes Dart commandline tool startup performance on macOS ARM64 (Apple Silicon).

SDK Triple shift #
Changed

Released: 2021-09-09

Introduced the triple-shift operator >>>, removed restrictions on type arguments for annotations, and added new features to dart:core and dart:ffi.

Language Operators #
New

Released: 2021-09-08

Added support for the triple-shift operator (>>>). This new operator works like >>, except that it always fills the most significant bits with zeros.

Language Annotations #
Changed

Released: 2021-09-08

Removed restrictions on type arguments for annotations. You can pass type arguments to annotations and use a generic function type as a type argument. As of this release, you can write the following code:

dart
@TypeHelper<int>(42, "The meaning")
late List<T Function<T>(T)> idFunctions;
var callback = [<T>(T value) => value];
late S Function<S extends T Function<T>(T)>(S) f;
Libraries dart:io #
Changed

Released: 2021-09-08

The setter callbacks .authenticate and .authenticateProxy in HttpClient must now accept a nullable realm argument (for pre-migrated null safe code).

Libraries dart:typed_data #
Deprecated

Released: 2021-09-08

Most types exposed by this library can no longer be extended, implemented or mixed-in.

Tools Dart VM #
New

Released: 2021-09-08

Expandos, and the object parameters of Dart_NewWeakPersistentHandle and Dart_NewFinalizableHandle, no longer accept Pointer and subtypes of Struct

Tools Dart command line #
Deprecated

Released: 2021-09-08

Deprecated the standalone dart2native tool

Tools Dart command line #
Deprecated

Released: 2021-09-08

Deprecated the standalone dartfmt tool.

Tools dart2js #
Deprecated

Released: 2021-09-08

dart2js no longer supports legacy browsers, because it emits ES6+ JavaScript by default.

Tools Dart dev compiler #
Changed

Released: 2021-09-08

Changed subtyping relations of package:js classes to be more correct and consistent with Dart2JS.

2.13

#
SDK Compiler crashes #
Changed

Released: 2021-06-28

This patch release fixes a Dart VM compiler crash and a DDC compiler crash.

SDK Compiler crashes #
Changed

Released: 2021-06-10

This patch release fixes a Dart compiler crash, an analysis server deadlock, and an analyzer crash when using package:meta v1.4.0.

SDK Type inference #
Changed

Released: 2021-05-25

This patch release fixes incorrect behavior in CastMap and missing nullability from recursive type hierarchies in DDC.

SDK Type aliases #
Changed

Released: 2021-05-18

Introduced non-function type aliases, improvements to dart:collection classes, and FFI support for packed structs and inline arrays.

Language Type aliases #
New

Released: 2021-05-19

Added support for type aliases for any type, not just functions. Type aliases used to work only for function types but now work for any type. You can use the new name created with a type alias anywhere the original type could be used.

Libraries dart:ffi #
New

Released: 2021-05-19

Added support for inline arrays in FFI structs and packed structs.

Libraries package:js #
Deprecated

Released: 2021-05-19

No longer valid to use a String that matches an @Native annotation in an @JS() annotation for a non-anonymous JS interop class.

2.12

#
SDK Compiler crashes #
Changed

Released: 2021-04-15

This patch release fixes Dart VM compiler crashes when compiling initializers containing async closures.

SDK Security #
Changed

Released: 2021-04-14

This patch release fixes a security vulnerability in dart:html related to DOM clobbering (CVE-2021-22540).

SDK Flutter crashes #
Changed

Released: 2021-03-17

This patch release fixes crashes reported by Flutter 2 users.

SDK HTTPS #
Changed

Released: 2021-03-10

This patch release fixes an unhandled exception in HTTPS connections and a typing issue in the typed_data + operator.

SDK Sound null safety #
Changed

Released: 2021-03-03

Introduced sound null safety, stable FFI, and many other new features and improvements across the platform.

Language Null safety #
Changed

Released: 2021-03-03

Null safety is now enabled by default in all code that has not opted out. When you opt into null safety, types in your code are non-nullable by default, meaning that variables can't contain null unless you say they can. With null safety, your runtime null-dereference errors turn into edit-time analysis errors.

Language Patch #
Fixed

Released: 2021-03-03

Fixed an implementation bug where this would sometimes undergo type promotion in extensions.

Libraries dart:ffi #
New Language versioned

Released: 2021-03-03

The FFI library is now stable.

Libraries dart:ffi #
Deprecated

Released: 2021-03-03

Deprecated invocations with a generic T of sizeOf<T>, Pointer<T>.elementAt(), Pointer<T extends Struct>.ref, and Pointer<T extends Struct>[]

Libraries dart:ffi #
Deprecated

Released: 2021-03-03

Deprecated allocate in package:ffi, as it will no longer be able to invoke sizeOf<T> generically.

Libraries dart:ffi #
Deprecated

Released: 2021-03-03

Deprecated subtypes of Struct without any native member.

Tools Dart VM #
Changed

Released: 2021-03-03

Dart_WeakPersistentHandle no longer auto-deletes itself when the referenced object is garbage collected to avoid race conditions.

Tools Dart VM #
Removed Breaking Changed

Released: 2021-03-03

Renamed Dart_WeakPersistentHandleFinalizer to Dart_HandleFinalizer and removed its handle argument.

Tools Pub #
Changed

Released: 2021-03-03

The Dart SDK constraint is now required in pubspec.yaml.

2.10

#
SDK Patch #
Changed

Released: 2021-01-21

This patch release fixes a crash in the Dart VM.

SDK Patch #
Changed

Released: 2020-11-12

This patch release fixes a crash in the Dart VM.

SDK Patch #
Changed

Released: 2020-10-29

This patch release fixes breaking changes in Chrome 86 affecting DDC, compiler errors with positional parameters, and AOT compilation crashes.

SDK Patch #
Changed

Released: 2020-10-15

This patch release fixes a DDC compiler crash.

SDK Patch #
Changed

Released: 2020-10-06

This patch release fixes crashes in Flutter applications, non-deterministic behavior, and uncaught TypeErrors in DDC.

SDK Unified C API #
Changed

Released: 2020-09-28

Introduced a unified C API for the VM, Dart_FinalizableHandles, and deferred loading of types in dart2js.

Tools Dart VM #
Changed

Released: 2020-10-01

Renamed dart_api_dl.cc to dart_api_dl.c and changed to a pure C file.

2.9

#
SDK Patch #
Changed

Released: 2020-09-08

Fixes DDC to handle a breaking change in Chrome.

SDK Patch #
Changed

Released: 2020-08-26

Fixes transient StackOverflow exceptions when building Flutter applications.

SDK Patch #
Changed

Released: 2020-08-12

Fixes unhandled exceptions in some Flutter applications.

SDK Platform updates #
Changed

Released: 2020-08-05

Updates dart:io with exit returning Never and OSError implementing Exception. Improves dart:html CssClassSet methods to return false instead of null. Web compilers now error on dart:mirrors import.

Libraries dart:convert #
Changed

Released: 2020-08-05

When encoding a string containing unpaired surrogates as UTF-8, the unpaired surrogates will be encoded as replacement characters (U+FFFD).

Libraries dart:convert #
Changed

Released: 2020-08-05

When decoding UTF-8, encoded surrogates will be treated as malformed input.

Libraries dart:convert #
Changed

Released: 2020-08-05

Changed the number of replacement characters emitted for malformed input sequences to match the WHATWG encoding standard when decoding UTF-8 with allowMalformed: true.

Libraries dart:html #
Changed

Released: 2020-08-05

CssClassSet.add() and CssClassSet.toggle now return false instead of null if the CssClassSet corresponds to multiple elements.

Libraries dart:mirrors #
Changed

Released: 2020-08-05

Web compilers (dart2js and DDC) now produce a compile-time error if dart:mirrors is imported.

Tools Dart VM #
Changed

Released: 2020-08-05

When printing a string using the print function, the default implementation will print any unpaired surrogates in the string as replacement characters (U+FFFD).

Tools Dart VM #
Changed

Released: 2020-08-05

The Dart_StringToUTF8 function in the Dart API will convert unpaired surrogates into replacement characters.

2.8

#
SDK Memory leaks #
Changed

Released: 2020-06-04

Fixes potential memory leaks in the Dart front-end.

SDK Flutter crashes #
Changed

Released: 2020-05-28

Fixes crashes in Flutter apps, a stack trace regression, and constant re-canonicalization issues.

SDK AOT Compilation #
Changed

Released: 2020-05-13

Fixes an AOT compilation bug causing NoSuchMethod exceptions in global transformations.

SDK Null safety prep #
Changed

Released: 2020-05-06

Prepares for non-nullable types with several breaking changes to core library APIs.

Language Type inference #
Fixed

Released: 2020-05-06

Fixed an implementation bug where local variable inference would incorrectly use the promoted type of a type variable.

Language Patch #
Fixed

Released: 2020-05-06

Fixed an implementation bug surrounding the clauses implements Function, extends Function, or with Function no longer having an effect since Dart 2.0.0.

Libraries dart:async #
Changed

Released: 2020-05-06

Changed the return type of StreamSubscription.cancel() to Future<void>.

Libraries dart:async #
Deprecated

Released: 2020-05-06

Split the runZoned() function into two functions: runZoned() and runZonedGuarded(), where the latter has a required onError parameter, and the former has none.

Libraries dart:async #
Changed Breaking

Released: 2020-05-06

Errors passed to Completer.completeError(), Stream.addError(), Future.error(), etc. can no longer be null.

Libraries dart:async #
Changed Breaking

Released: 2020-05-06

Made stack traces non-null.

Libraries dart:core #
Changed Breaking

Released: 2020-05-06

Three members on RuneIterator no longer return null when accessed before the first call to moveNext().

Libraries dart:core #
Changed Breaking

Released: 2020-05-06

The String.fromEnvironment() default value for defaultValue is now an empty string instead of null.

Libraries dart:core #
Changed Breaking

Released: 2020-05-06

The default value for int.fromEnvironment()'s defaultValue parameter is now zero.

Libraries dart:ffi #
Changed

Released: 2020-05-06

Changed Pointer.asFunction() and DynamicLibrary.lookupFunction() to extension methods.

Libraries dart:io #
Changed Breaking

Released: 2020-05-06

Changed the signature of HttpHeaders methods add() and set.

Libraries dart:io #
Changed Breaking

Released: 2020-05-06

The Socket class now throws a SocketException if the socket has been explicitly destroyed or upgraded to a secure socket upon setting or getting socket options.

Libraries dart:io #
Changed Breaking

Released: 2020-05-06

The Process class now throws a StateError if the process is detached (ProcessStartMode.detached and ProcessStartMode.detachedWithStdio) upon accessing the exitCode getter.

Libraries dart:io #
Changed Breaking

Released: 2020-05-06

The Process class now also throws when not connected to the child process's stdio (ProcessStartMode.detached and ProcessStartMode.inheritStdio) upon accessing the stdin, stdout, and stderr getters.

Libraries dart:io #
Changed Breaking

Released: 2020-05-06

The dummy object returned if FileStat.stat() or FileStat.statSync() fail now contains Unix epoch timestamps instead of null for the accessed, changed, and modified getters.

Libraries dart:io #
Changed

Released: 2020-05-06

The HeaderValue class now parses more strictly in two invalid edge cases.

Tools Dart dev compiler #
Fixed

Released: 2020-05-06

We fixed several inconsistencies between DDC and Dart2JS so that users less frequently encounter code that is accepted by one compiler but then fails in the other.

Tools Dart dev compiler #
Removed Breaking

Released: 2020-05-06

Deleted the legacy (analyzer based) version of DDC.

Tools Dart dev compiler #
Changed Breaking

Released: 2020-05-06

Functions passed to JavaScript using the recommended package:js interop specification must now be wrapped with a call to allowInterop.

Tools Dart dev compiler #
Changed Breaking

Released: 2020-05-06

Constructors in @JS() classes must be marked with external.

Tools dart2js #
Changed

Released: 2020-05-06

Corresponding type parameter bounds now only need to be mutual subtypes rather than structurally equal up to renaming of bound type variables and equating all top types.

Tools dart2js #
Changed Breaking

Released: 2020-05-06

Types are now normalized.

Tools dart2js #
Changed Breaking

Released: 2020-05-06

Constructors in @JS() classes must be marked with external.

Tools dart2js #
Removed Breaking

Released: 2020-05-06

Completely removed the --package-root flag, which was hidden and disabled in Dart 2.0.0.

2.7

#
SDK Security #
Changed

Released: 2020-03-23

Fixes a security vulnerability in dart:html (CVE-2020-8923) and improves ARMv8 compatibility.

SDK dart2js #
Changed

Released: 2020-01-23

Improves dart2js compile-time and changes macOS SDK availability to x64 only.

SDK Extension methods #
Changed

Released: 2019-12-11

Introduces official support for extension methods. Adds new constructors to TypedData in dart:typed_data. Improves Dart VM field initialization on reload.

Language Extension methods #
New

Released: 2019-12-11

Added support for extension methods. enabling you to add functionality to any type, even types you don't control with the brevity and auto-complete experience of regular method calls.

The following example extends the String class from dart:core with a new parseInt() method:

dart
extension ParseNumbers on String {
  int parseInt() {
    return int.parse(this);
  }
}
​
void main() {
  int i = '42'.parseInt();
  print(i);
}
Language macOS Support #
Changed

Released: 2019-12-11

The Dart SDK for macOS is now only available for x64.

Language Extension methods #
Changed

Released: 2019-12-11

Static extension members are accessible when imported with a prefix.

Libraries dart:io #
New

Released: 2019-12-11

Added IOOverrides.serverSocketBind to aid in writing tests that wish to mock ServerSocket.bind.

2.6

#
SDK Patch #
Changed

Released: 2019-11-11

Reduces dart2js memory usage, improves ARM64 stability, and updates FFI documentation.

SDK Static extensions preview #
Changed

Released: 2019-11-05

Introduces a preview of static extension members. Changes inference for Null values in FutureOr contexts. Updates dart:ffi with static extension members and removes memory management.

Language Type inference #
Changed

Released: 2019-11-05

Changed inference when using Null values in a FutureOr context. Namely, constraints of the forms similar to Null <: FutureOr<T> now yield Null as the solution for T.

For example, the following code now prints Null. Before Dart 2.6, it printed dynamic. The anonymous closure () {} returns the Null type.

dart
import 'dart:async';
​
void foo<T>(FutureOr<T> Function() f) { print(T); }
​
main() { foo(() {}); }
Libraries dart:ffi #
Changed

Released: 2019-11-05

The API now makes use of static extension members.

Libraries dart:ffi #
Removed Breaking

Released: 2019-11-05

Removed memory management Pointer.allocate and Pointer.free.

Libraries dart:ffi #
Removed Breaking

Released: 2019-11-05

Pointer.offsetBy was removed, use cast and elementAt instead.

2.5

#
SDK Patch #
Changed

Released: 2019-10-08

Fixes macOS Catalina binary signing issues.

SDK Patch #
Changed

Released: 2019-09-27

Fixes type inference failures in the analyzer.

SDK Constant expressions #
Changed

Released: 2019-09-10

Expands the set of operations allowed in constant expressions, including casts, type tests, and collection features.

Libraries dart:ffi #
New

Released: 2019-09-10

Added a preview of Dart FFI for calling C code.

Libraries Type system #
Changed

Released: 2019-09-10

Various methods and properties across various core libraries, which used to declare a return type of List<int>, were updated to declare a return type of Uint8List.

Libraries dart:io #
Changed

Released: 2019-09-10

The Cookie class's constructor's name and value optional positional parameters are now mandatory.

Libraries dart:io #
Changed

Released: 2019-09-10

The Cookie class's name and value setters now validate that the strings are made from the allowed character set and are not null.

Tools Pub #
Deprecated

Released: 2019-09-10

Packages published to pub.dev can no longer contain git dependencies.

2.4

#
SDK Patch #
Changed

Released: 2019-08-07

Fixes a performance regression in JIT mode and a potential AOT compiler crash.

SDK TransferableTypedData #
Changed

Released: 2019-06-27

Adds TransferableTypedData for faster cross-isolate communication. Enforces covariance of type variables used in super-interfaces. Allows async as an identifier in asynchronous and generator functions.

Language Type system #
Changed

Released: 2019-06-27

Covariance of type variables used in super-interfaces is now enforced.

For example: Prior to this release Dart accepted, but now rejects, the following code:

dart
class A<X> {};
class B<X> extends A<void Function(X)> {};
Language Async support #
New

Released: 2019-06-27

You can now use async as an identifier in asynchronous and generator functions.

Libraries dart:isolate #
Changed

Released: 2019-06-27

Isolate.resolvePackageUri will always throw an UnsupportedError when compiled with dart2js or DDC.

Libraries dart:async #
Fixed

Released: 2019-06-27

Fixed a bug in the StreamIterator class where await for allowed null as a stream.

2.3

#
SDK Patch #
Changed

Released: 2019-06-11

Fixes a security vulnerability in Process.run on Linux and Android by not searching the current directory.

SDK Patch #
Changed

Released: 2019-05-21

Fixes a dart2js compiler crash when compiling UI-as-code features within fields.

SDK UI-as-code #
Changed

Released: 2019-05-08

Introduces UI-as-code features: spread operator (...), collection if, and collection for.

Language Spread operator #
New

Released: 2019-05-08

Added support for the spread operator (... and ...?) in collection literals. The spread operator enables unpacking the elements from one list into another. In the following example, the list returned by buildMainElements() is unpacked into the list being passed to the children argument:

dart
Widget build(BuildContext context) {
  return Column(children: [
    Header(),
    ...buildMainElements(),
    Footer(),
  ]);
}
Language Collection if #
New

Released: 2019-05-08

Added support for collection if in collection literals. The collection if operator enables adding elements conditionally. The following example adds a FlatButton element unless the app displays the last page:

dart
Widget build(BuildContext context) {
  return Column(children: [
    Text(mainText),
    if (page != pages.last)
      FlatButton(child: Text('Next')),
  ]);
}
Language Collection for #
New

Released: 2019-05-08

Added support for collection for in collection literals. The collection for operator enables building repeated elements. The following example adds one HeadingAction element for each section in sections:

dart
Widget build(BuildContext context) {
  return Column(children: [
    Text(mainText),
    for (var section in sections)
      HeadingAction(section.heading),
  ]);
}

2.2

#
SDK Set literals #
Changed

Released: 2019-02-26

Introduces set literals using {}. Renames klass getter to classNode in Kernel AST API. Updates Link implementation on Windows to use true symbolic links.

Language Set literals #
New

Released: 2019-02-26

Added support for set literals using {}.

The following example creates a set of currencies:

dart
const Set<String> currencies = {'EUR', 'USD', 'JPY'};
Libraries package:kernel #
Changed

Released: 2019-02-26

The klass getter on the InstanceConstant class in the Kernel AST API has been renamed to classNode for consistency.

Libraries package:kernel #
Changed

Released: 2019-02-26

Updated Link implementation to utilize true symbolic links instead of junctions on Windows.

2.1

#
SDK Patch #
Changed

Released: 2018-11-15

Fixes a soundness hole in dart:mirrors and adds a StateError when adding to a closed IOSink.

Libraries dart:io #
New Changed

Released: 2018-11-15

Added to a closed IOSink now throws a StateError.

Tools Dart VM #
Fixed

Released: 2018-11-15

Fixed a soundness hole when using dart:mirrors to reflectively invoke a method in an incorrect way that violates its static types.

SDK Int-to-Double Conversion #
Changed

Released: 2018-11-15

Introduces int-to-double conversion, new mixin syntax, and various static error checks.

Language Number types #
New

Released: 2018-11-15

Added support for int-to-double conversion, allowing developers to set double values using integer literals. This feature removed the annoyance of being forced to use a double literal (for example, 4.0) when the value was an integer in concept.

In the following Flutter code, horizontal and vertical have type double:

dart
padding: const EdgeInsets.symmetric(
  horizontal: 4,
  vertical: 8,
)
Tools dart2js #
Changed

Released: 2018-11-15

Duplicate keys in a const map are not allowed and produce a compile-time error.

2.0

#
SDK Sound type system #
Language versioned

Released: 2018-08-07

Introduces a sound static type system (formerly strong mode). Makes new keyword optional and const optional in const contexts. Changes async functions to run synchronously until the first await. Renames core library constants to lowerCamelCase.

Language Type system #
Changed

Released: 2018-02-22

Replaced the unsound optional static type system with a sound static type system using type inference and runtime checks, formerly called strong mode.

Language Async functions #
Changed

Released: 2018-02-22

Functions marked async now run synchronously until the first await statement.

Libraries Constants #
Changed

Released: 2018-02-22

Renamed constants in the core libraries from SCREAMING_CAPS to lowerCamelCase.

Libraries Type system #
New

Released: 2018-02-22

Implemented a new sound type system. Before Dart 2.0, types weren't fully sound, and Dart relied heavily on runtime type checking. Dart 1.x code had to be migrated to Dart 2.

Many new methods were added to core library classes that will need to be implemented if you implement the interfaces of these classes.

Libraries Web #
Removed Breaking

Released: 2018-02-22

dart:isolate and dart:mirrors are no longer supported when using Dart for the web.

Tools Pub #
New

Released: 2018-02-22

Replaced pub's transformer-based build system with a new build system.

Filter by

Type

Area

    Version

    Types of changes

    New New
    Introduces a new feature or API.
    Fixed Fixed
    Fixes a bug or defect.
    Changed Changed
    Modifies existing behavior or APIs.
    Breaking Breaking
    Incompatible change that may require code migration.
    Unversioned
    The Dart SDK doesn't maintain backward compatibility, and code might break as soon as you upgrade your SDK version if it relies on the previous behavior. These are the majority of changes and aren't specially marked.
    Language versioned Language versioned
    The Dart SDK maintains backward compatibility for existing code, and the behavior change only takes effect when you upgrade the language version of your code.
    Deprecations Deprecated / Removed
    The Dart SDK maintains compatibility for deprecated code, with a warning. Deprecations are then completely removed in a later release, breaking any code that relies on the previous behavior.
    Experimental Experimental
    Part of the release but not yet treated as stable in the SDK and can break from one version to another.