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

SDKPlatform Updates
Changed

Released: TBD

Dart 3.11 adds support for Unix domain sockets on Windows in dart:io. It also removes support for dart:js_util in dart2wasm, requiring migration to dart:js_interop.

ToolsWasm compilation
Removed Breaking

Released: TBD

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

LanguageDot Shorthands
Changed

Released: 2025-11-12

Dart 3.10 introduces 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.

LanguageGenerator 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 (?.).

Librariesdart:core
Fixed

Released: 2025-11-12

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

Librariesdart:core
Deprecated

Released: 2025-11-12

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

Librariesdart: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.

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

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

ToolsSDK
Removed Breaking

Released: 2025-11-12

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

ToolsAnalyzer
Changed

Released: 2025-11-12

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

ToolsAnalyzer
Changed

Released: 2025-11-12

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

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

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

ToolsWasm 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

SDKModular builds
Changed

Released: 2025-09-30

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

SDKDart VM
Changed

Released: 2025-09-09

This patch release fixes an issue in the Dart VM where an incorrect type could be inferred for a loop variable.

SDKDDC
Changed

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.

SDKType Promotion
Changed

Released: 2025-08-13

Dart 3.9 assumes null safety for type promotion, reachability, and definite assignment. The analysis server now uses an AOT-compiled snapshot for improved performance. New lints switch_on_type and unnecessary_unawaited were added, along with a new @awaitNotRequired annotation.

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

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

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

ToolsDart 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

SDKDevTools, Hot Restart
Changed

Released: 2025-07-31

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

SDKDart2Wasm
Changed

Released: 2025-07-16

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

SDKDDC
Changed

Released: 2025-05-28

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

SDKNull-aware Elements
Changed

Released: 2025-05-20

Dart 3.8 introduces null-aware elements for collections, making it easier to conditionally add elements based on nullability. It also adds Iterable.withIterator, HttpClientBearerCredentials, and various analyzer improvements including new quick fixes and lints.

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

Librariesdart:html
Removed Breaking

Released: 2025-05-20

The Element.created constructor has been removed.

Librariesdart:html
Deprecated

Released: 2025-05-20

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

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

ToolsProduction JavaScript compiler
Experimental Removed Breaking

Released: 2025-05-20

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

ToolsFormatter
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

SDKAnalysis Server
Changed

Released: 2025-04-16

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

SDKdart2wasm
Changed

Released: 2025-03-12

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

SDKDevTools, 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.

SDKWildcard Variables
Changed

Released: 2025-02-12

Dart 3.7 introduces wildcard variables, a new "tall" style for the dart formatter, and officially deprecates older web libraries in favor of package:web and dart:js_interop. It also includes numerous analyzer improvements and new lints.

LanguageWildcard 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 _()) {}
LanguageType 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.

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

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

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

ToolsFormatter
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,
);
ToolsFormatter
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.

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

SDKDigit Separators
Changed

Released: 2024-12-11

Dart 3.6 introduces digit separators for number literals, improves throw expression type inference, and adds support for pub workspaces. It also includes new JSArray constructors and methods in dart:js_interop, and several new lints and assists.

LanguageDigit 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;
LanguageType 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.

Librariesdart:io
Removed Breaking

Released: 2024-12-11

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

Librariesdart: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.

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

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

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

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

ToolsFormatter
Changed

Released: 2024-12-11

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

ToolsFormatter
Fixed

Released: 2024-12-11

Correctly format imports with both as and if clauses.

ToolsPub
Changed

Released: 2024-12-11

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

3.5

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

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

SDKDart2Wasm
Changed

Released: 2024-08-14

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

SDKSound Null Safety Only
Changed

Released: 2024-08-06

Dart 3.5 aligns type inference for await and if-null expressions with the analyzer. It also updates dart:core DateTime on web to store microseconds, makes SecurityContext final, and removes unsound null safety support in the VM.

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

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

Librariesdart:core
Changed

Released: 2024-08-06

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

Librariesdart: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.

RuntimeSound 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.
RuntimeC API
Removed Breaking

Released: 2024-08-06

The Dart_DefaultCanonicalizeUrl function has been removed from the C API.

3.4

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

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

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

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

SDKType Analysis Improvements
Changed

Released: 2024-05-14

Dart 3.4 improves type analysis for conditional expressions, if-null, and switch expressions. It also adds ExternalDartReference to dart:js_interop, deprecates unmodifiable typed data views, and removes waitFor from dart:cli.

LanguageType Analysis
Changed

Released: 2024-05-14

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

LanguagePatterns
Changed

Released: 2024-05-14

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

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

Librariesdart: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.

Librariesdart: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.

Librariesdart: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.

Librariesdart: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.

Librariesdart: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.

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

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

RuntimeDart 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

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

SDKDart VM
Changed

Released: 2024-03-27

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

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

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

SDKExtension Types
Changed

Released: 2024-02-15

Dart 3.3 introduces extension types for zero-cost wrappers, improves private field promotion, and adds new features to dart:ffi and dart:js_interop, including Native.addressOf and importModule.

SDKExperiments
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
LanguageExtension 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.
}
LanguagePrivate 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.

Librariesdart:cli
Experimental Deprecated

Released: 2024-02-15

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

Librariesdart:ffi
Deprecated

Released: 2024-02-15

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

Librariesdart: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.

Librariesdart:html
Changed

Released: 2024-02-15

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

Librariesdart: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.

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

ToolsWasm compiler
Experimental

Released: 2024-02-15

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

ToolsAnalyzer
Experimental

Released: 2024-02-15

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

ToolsAnalyzer
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
ToolsLinter
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.

ToolsLinter
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

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

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

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

SDKPrivate Field Promotion
Changed

Released: 2023-11-15

Dart 3.2 introduces private field promotion, allowing private final fields to be promoted to non-nullable types. It also includes breaking changes to refutable patterns split points, disables waitFor by default, and changes utf8.encode return type to Uint8List.

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

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

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

Librariesdart:cli
Experimental Deprecated

Released: 2023-11-15

Deprecated the waitFor function.

Librariesdart: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.

Librariesdart: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.

Librariesdart:io
Changed

Released: 2023-11-15

Eliminated trailing whitespace from HTTP headers.

Librariesdart: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.

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

ToolsAnalyzer
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

SDKDart2js
Changed

Released: 2023-10-25

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

SDKDart VM
Changed

Released: 2023-10-18

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

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

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

SDKParser
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

Dart 3.1 adds breaking changes to dart:async and dart:io class modifiers, introduces NativeCallable for FFI, and makes various updates to dart:core and dart:js_interop.

Librariesdart:async
New

Released: 2023-08-16

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

Librariesdart:io
New

Released: 2023-08-16

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

Librariesdart: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().

Librariespackage: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.

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

SDKDart2js
Changed

Released: 2023-07-26

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

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

SDKFrontend
Changed

Released: 2023-06-14

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

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

SDKFrontend
Changed

Released: 2023-02-07

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

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

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

SDKDart 3
Changed

Released: 2023-05-10

Dart 3.0 introduces major language features including records, patterns, class modifiers, and 100% sound null safety. It also includes many other improvements and breaking changes across the platform.

LanguagePatterns
New

Released: 2023-05-10

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

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

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

LanguageSwitch Expressions
New

Released: 2023-05-10

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

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

LanguagePatterns
Language versioned Changed

Released: 2023-05-10

Changed interpretation of switch cases from constant expressions to patterns.

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

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

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

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

Librariesdart:core
Deprecated

Released: 2023-05-10

List constructor: Deprecated in favor of List.filled.

Librariesdart: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.

Librariesdart: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.

Librariesdart:ffi
Experimental Deprecated

Released: 2023-05-10

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

Librariesdart:html
Removed Breaking

Released: 2023-05-10

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

Librariesdart:math
Language versioned Deprecated

Released: 2023-05-10

The Random interface can only be implemented, not extended.

Librariesdart:io
New Changed

Released: 2023-05-10

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

LanguageLanguage 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

SDKVM
Changed

Released: 2023-03-29

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

SDKFFI
Changed

Released: 2023-03-22

This patch release fixes broken usage of Dart_CObject_Type.

SDKVM
Changed

Released: 2023-03-08

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

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

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

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

SDKUnnamed Libraries
Changed

Released: 2023-01-24

Dart 2.19 introduces support for unnamed libraries, improved flow analysis for unreachable code, and reports compile-time errors for cyclic dependencies during top-level type inference.

LanguageUnnamed 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;
LanguageFlow Analysis
Changed

Released: 2023-01-25

Added more flow analysis flags for unreachable code cases.

LanguageFlow Analysis
Changed

Released: 2023-01-25

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

LanguagePrivate Names
Changed

Released: 2023-01-25

Don't delegate inaccessible private names to noSuchMethod.

LanguageType Inference
Changed

Released: 2023-01-25

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

Librariesdart: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.

Librariesdart: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.

Librariesdart:io
Changed

Released: 2023-01-25

Disallow negative or hexadecimal content-length headers.

Librariesdart: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.

Librariesdart:io
Changed

Released: 2023-01-25

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

Librariesdart: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.

Librariesdart:mirrors
Removed Breaking

Released: 2023-01-25

Removed APIs MirrorsUsed and Comment.

Librariespackage: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.
Librariesdart2js
Deprecated

Released: 2023-01-25

dart2js no longer supports HTTP URIs as inputs.

2.18

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

SDKHot Reload
Changed

Released: 2022-11-02

This patch release fixes crashes during hot reload.

SDKCode Coverage
Changed

Released: 2022-10-19

This patch release fixes a regression in code coverage computation.

SDKUri
Changed

Released: 2022-09-28

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

SDKType Inference
Changed

Released: 2022-09-14

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

SDKType Inference
Changed

Released: 2022-08-30

Dart 2.18 enhances type inference for generic invocations with function literals, introduces breaking changes in dart:io networking APIs, and removes standalone tools like dart2js and dartanalyzer.

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

LanguageMixins
Removed Breaking

Released: 2022-08-30

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

Librariesdart:io
Changed

Released: 2022-08-30

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

Librariesdart:io
Removed Breaking

Released: 2022-08-30

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

Librariesdart: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.

ToolsDart command line
Removed Breaking

Released: 2022-08-30

Removed the standalone dart2js and dartdevc tools.

ToolsDart command line
Removed Breaking

Released: 2022-08-30

Removed the standalone dartanalyzer tool.

2.17

SDKDebugger
Changed

Released: 2022-08-24

This patch release fixes a crash in the debugger.

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

SDKAnalyzer
Changed

Released: 2022-06-22

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

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

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

SDKEnhanced Enums
Changed

Released: 2022-05-11

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

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

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

LanguageNamed Parameters
New

Released: 2022-05-11

Added support for named arguments anywhere. Named arguments can now be freely interleaved with positional arguments. As of Dart 2.17, you can write the following code:

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

Released: 2022-05-11

Added new connectionFactory property to HttpClient.

Librariesdart:io
Fixed New

Released: 2022-05-11

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

Librariesdart:io
Removed Breaking

Released: 2022-05-11

Removed constants in dart:io following the SCREAMING_CAPS

Librariesdart:io
New

Released: 2022-05-11

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

ToolsDart command line
Deprecated

Released: 2022-05-11

Deprecated the standalone dart2js tool.

ToolsDart command line
Deprecated

Released: 2022-05-11

Deprecated the standalone dartdevc tool.

ToolsDart command line
Removed Breaking

Released: 2022-05-11

Removed the standalone dartdoc tool.

2.16

SDKFlutter Web
Changed

Released: 2022-03-24

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

SDKFlutter AOT
Changed

Released: 2022-02-09

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

SDKTooling Updates
Changed

Released: 2022-02-03

Dart 2.16 adds Error.throwWithStackTrace, Abi specific integers in FFI, improves dart pub with concurrency and new commands, and deprecates standalone tools in favor of dart commands.

Librariesdart: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.

Librariesdart:io
Removed Breaking

Released: 2022-02-03

Removed the Platform.packageRoot API.

Librariesdart:isolate
Removed Breaking

Released: 2022-02-03

Removed the Isolate.packageRoot API.

ToolsDart command line
Deprecated

Released: 2022-02-03

Deprecated the standalone dartanalyzer tool.

ToolsDart command line
Deprecated

Released: 2022-02-03

Deprecated the standalone dartdoc tool.

ToolsDart command line
Removed Breaking

Released: 2022-02-03

Removed the deprecated standalone pub tool.

2.15

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

SDKConstructor Tear-offs
Changed

Released: 2021-12-08

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

LanguageConstructor Tear-offs
New

Released: 2021-12-08

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

Librariesdart: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.

Librariesdart:web_sql
Removed Breaking

Released: 2021-12-08

Completely deleted the dart:web_sql library.

Librariesdart:html
Removed Breaking

Released: 2021-12-08

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

ToolsDart command line
Removed Breaking

Released: 2021-12-08

Removed the standalone dart2native tool.

ToolsDart command line
Removed Breaking

Released: 2021-12-08

Removed the standalone dartfmt tool.

ToolsDart VM
Removed Breaking

Released: 2021-12-08

Removed support for dart-ext:-style native extensions

ToolsDart 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

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

SDKPerformance
Changed

Released: 2021-09-30

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

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

SDKPerformance
Changed

Released: 2021-09-09

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

SDKTriple Shift
Changed

Released: 2021-09-09

Dart 2.14 introduces the triple-shift operator >>>, removes restrictions on type arguments for annotations, and adds new features to dart:core and dart:ffi.

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

LanguageAnnotations
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 Dart 2.14, 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;
Librariesdart: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.

ToolsDart 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

ToolsDart command line
Deprecated

Released: 2021-09-08

Deprecated the standalone dart2native tool

ToolsDart command line
Deprecated

Released: 2021-09-08

Deprecated the standalone dartfmt tool.

Toolsdart2js
Deprecated

Released: 2021-09-08

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

ToolsDart Dev Compiler
Changed

Released: 2021-09-08

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

2.13

SDKCompiler crashes
Changed

Released: 2021-06-28

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

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

SDKType inference
Changed

Released: 2021-05-25

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

SDKType Aliases
Changed

Released: 2021-05-18

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

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

Librariesdart:ffi
New

Released: 2021-05-19

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

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

SDKCompiler crashes
Changed

Released: 2021-04-15

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

SDKSecurity
Changed

Released: 2021-04-14

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

SDKFlutter crashes
Changed

Released: 2021-03-17

This patch release fixes crashes reported by Flutter 2 users.

SDKHTTPS
Changed

Released: 2021-03-10

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

SDKSound Null Safety
Changed

Released: 2021-03-03

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

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

LanguagePatch
Fixed

Released: 2021-03-03

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

Librariesdart:ffi
New Language versioned

Released: 2021-03-03

The FFI library is now stable.

Librariesdart: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>[]

Librariesdart:ffi
Deprecated

Released: 2021-03-03

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

Librariesdart:ffi
Deprecated

Released: 2021-03-03

Deprecated subtypes of Struct without any native member.

ToolsDart VM
Changed

Released: 2021-03-03

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

ToolsDart VM
Removed Breaking Changed

Released: 2021-03-03

Renamed Dart_WeakPersistentHandleFinalizer to Dart_HandleFinalizer and removed its handle argument.

ToolsPub
Changed

Released: 2021-03-03

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

2.10

SDKPatch
Changed

Released: 2021-01-21

This patch release fixes a crash in the Dart VM.

SDKPatch
Changed

Released: 2020-11-12

This patch release fixes a crash in the Dart VM.

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

SDKPatch
Changed

Released: 2020-10-15

This patch release fixes a DDC compiler crash.

SDKPatch
Changed

Released: 2020-10-06

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

SDKUnified C API
Changed

Released: 2020-09-28

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

ToolsDart 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

SDKPatch
Changed

Released: 2020-09-08

Fixes DDC to handle a breaking change in Chrome.

SDKPatch
Changed

Released: 2020-08-26

Fixes transient StackOverflow exceptions when building Flutter applications.

SDKPatch
Changed

Released: 2020-08-12

Fixes unhandled exceptions in some Flutter applications.

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

Librariesdart: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).

Librariesdart:convert
Changed

Released: 2020-08-05

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

Librariesdart: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.

Librariesdart:html
Changed

Released: 2020-08-05

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

Librariesdart:mirrors
Changed

Released: 2020-08-05

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

ToolsDart 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).

ToolsDart VM
Changed

Released: 2020-08-05

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

2.8

SDKMemory leaks
Changed

Released: 2020-06-04

Fixes potential memory leaks in the Dart front-end.

SDKFlutter crashes
Changed

Released: 2020-05-28

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

SDKAOT Compilation
Changed

Released: 2020-05-13

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

SDKNull Safety Prep
Changed

Released: 2020-05-06

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

LanguageType Inference
Fixed

Released: 2020-05-06

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

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

Librariesdart:async
Changed

Released: 2020-05-06

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

Librariesdart: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.

Librariesdart:async
Changed Breaking

Released: 2020-05-06

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

Librariesdart:async
Changed Breaking

Released: 2020-05-06

Made stack traces non-null.

Librariesdart:core
Changed Breaking

Released: 2020-05-06

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

Librariesdart:core
Changed Breaking

Released: 2020-05-06

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

Librariesdart:core
Changed Breaking

Released: 2020-05-06

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

Librariesdart:ffi
Changed

Released: 2020-05-06

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

Librariesdart:io
Changed Breaking

Released: 2020-05-06

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

Librariesdart: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.

Librariesdart: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.

Librariesdart: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.

Librariesdart: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.

Librariesdart:io
Changed

Released: 2020-05-06

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

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

ToolsDart Dev Compiler
Removed Breaking

Released: 2020-05-06

Deleted the legacy (analyzer based) version of DDC.

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

ToolsDart Dev Compiler
Changed Breaking

Released: 2020-05-06

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

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

Toolsdart2js
Changed Breaking

Released: 2020-05-06

Types are now normalized.

Toolsdart2js
Changed Breaking

Released: 2020-05-06

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

Toolsdart2js
Removed Breaking

Released: 2020-05-06

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

2.7

SDKSecurity
Changed

Released: 2020-03-23

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

SDKdart2js
Changed

Released: 2020-01-23

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

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

LanguageExtension 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);
}
LanguagemacOS Support
Changed

Released: 2019-12-11

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

LanguageExtension Methods
Changed

Released: 2019-12-11

Static extension members are accessible when imported with a prefix.

Librariesdart:io
New

Released: 2019-12-11

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

2.6

SDKPatch
Changed

Released: 2019-11-11

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

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

LanguageType 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(() {}); }
Librariesdart:ffi
Changed

Released: 2019-11-05

The API now makes use of static extension members.

Librariesdart:ffi
Removed Breaking

Released: 2019-11-05

Removed memory management Pointer.allocate and Pointer.free.

Librariesdart:ffi
Removed Breaking

Released: 2019-11-05

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

2.5

SDKPatch
Changed

Released: 2019-10-08

Fixes macOS Catalina binary signing issues.

SDKPatch
Changed

Released: 2019-09-27

Fixes type inference failures in the analyzer.

SDKConstant Expressions
Changed

Released: 2019-09-10

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

Librariesdart:ffi
New

Released: 2019-09-10

Added a preview of Dart FFI for calling C code.

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

Librariesdart:io
Changed

Released: 2019-09-10

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

Librariesdart: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.

ToolsPub
Deprecated

Released: 2019-09-10

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

2.4

SDKPatch
Changed

Released: 2019-08-07

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

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

LanguageType 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)> {};
LanguageAsync Support
New

Released: 2019-06-27

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

Librariesdart:isolate
Changed

Released: 2019-06-27

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

Librariesdart:async
Fixed

Released: 2019-06-27

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

2.3

SDKPatch
Changed

Released: 2019-06-11

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

SDKPatch
Changed

Released: 2019-05-21

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

SDKUI-as-code
Changed

Released: 2019-05-08

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

LanguageSpread 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(),
  ]);
}
LanguageCollection 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')),
  ]);
}
LanguageCollection 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

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

LanguageSet 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

SDKPatch
Changed

Released: 2018-11-15

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

Librariesdart:io
New Changed

Released: 2018-11-15

Added to a closed IOSink now throws a StateError.

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

SDKInt-to-Double Conversion
Changed

Released: 2018-11-15

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

LanguageNumber 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,
)
Toolsdart2js
Changed

Released: 2018-11-15

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

2.0

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

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

LanguageAsync Functions
Changed

Released: 2018-02-22

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

LibrariesConstants
Changed

Released: 2018-02-22

Renamed constants in the core libraries from SCREAMING_CAPS to lowerCamelCase.

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

LibrariesWeb
Removed Breaking

Released: 2018-02-22

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

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