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
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.
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
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.
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 (?.).
dart:coreReleased: 2025-11-12
The Uri.parseIPv4Address and Uri.parseIPv6Address functions no longer
incorrectly allow leading zeros in IPv4 addresses.
dart:coreReleased: 2025-11-12
The ability to implement RegExp and RegExpMatch is deprecated and will
be removed in a future release.
dart:iodart:js_interop
Released: 2025-11-12
The Uint16ListToJSInt16Array extension has been renamed to
Uint16ListToJSUint16Array.
dart:js_interop
Released: 2025-11-12
The JSUint16ArrayToInt16List extension has been renamed to
JSUint16ArrayToUint16List.
dart:js_interop
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.
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.
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.
Released: 2025-11-12
The dart tool is no longer available for IA32 platforms as the Dart SDK no
longer supports IA32.
Released: 2025-11-12
Using members marked as @experimental outside the package they are
declared in now results in a warning.
Released: 2025-11-12
Lint rules enabled in included analysis options files now result in incompatible lint diagnostics when appropriate.
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.
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.
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
Released: 2025-09-30
This patch release fixes a performance regression in modular builds where static calls are deeply nested within a closure.
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.
Released: 2025-08-27
This patch release fixes an issue in DDC where static getters could be unintentionally invoked during a hot reload.
Released: 2025-08-20
This patch release fixes issues in DevTools, ARM32 compilation, and git
dependencies using tag_pattern.
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.
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.
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.
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.
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
Released: 2025-07-31
This patch release fixes issues with the DevTools Network screen and Hot Restart.
Released: 2025-07-16
This patch release fixes an issue with the size of cross-compiled binaries.
Released: 2025-05-28
This patch release fixes an issue in DDC with late variables being incorrectly captured within async function bodies.
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.
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.
dart:htmlReleased: 2025-05-20
The Element.created constructor has been removed.
dart:htmlReleased: 2025-05-20
Native classes in dart:html, such as HtmlElement, can no longer be
extended.
Released: 2025-05-20
The avoid_null_checks_in_equality_operators lint rule is deprecated and
should be removed from analysis_options.yaml files.
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.
Released: 2025-05-20
The --experiment-new-rti and --use-old-rti flags are no longer
supported.
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
Released: 2025-04-16
This patch release fixes a performance regression in the analysis server.
Released: 2025-03-12
This patch release fixes a bug in dart2wasm related to js-string builtin
functions with non-nullable parameter types.
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.
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.
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:
Foo(_, this._, super._, void _()) {}
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.
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.
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.
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.
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:
longFunction(
longArgument,
anotherLongArgument,
);
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
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.
Released: 2025-01-08
This patch release fixes issues with pub get in workspaces, AOT/dart2wasm
compilation crashes, and analysis options discovery in workspaces.
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.
Released: 2024-12-11
Added support for digit separator underscores (_) to the language. Digit
separators improve readability of long number literals.
var m = 1__000_000__000_000__000_000;
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.
dart:ioReleased: 2024-12-11
The Platform() constructor has been removed. All instantiations of
Platform should be removed.
dart:ioReleased: 2024-12-11
HttpClient now responds to a redirect that's missing a "Location" header
by throwing a RedirectException instead of a StateError.
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.
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.
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.
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:
Released: 2024-12-11
Preserve type parameters on old-style function-typed formals that also use
this. or super..
Released: 2024-12-11
Correctly format imports with both as and if clauses.
Released: 2024-12-11
dart pub publish now warns if files that are tracked in git have
uncommitted changes.
3.5
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.
Released: 2024-08-28
This patch release fixes bugs in ZLibDecoder, running dart from PATH,
and analysis server context roots in multi-package workspaces.
Released: 2024-08-14
This patch release fixes issues with include: in analysis_options.yaml,
wasm source maps, and several dart2wasm compiler bugs.
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.
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.
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.
dart:coreReleased: 2024-08-06
DateTime now stores microseconds on the web platform, more closely
matching the behavior on native platforms.
dart:iodart:js_interop
Released: 2024-08-06
importModule now accepts a JSAny instead of a String to support other
JS values as well, such as TrustedScriptURL objects.
dart:js_interop
Released: 2024-08-06
isTruthy and not now return JSBoolean instead of bool
to be
consistent with other JS operator methods.
dart:js_interop
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.
dart:typed_data
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.
Released: 2024-08-06
The Dart VM no longer supports unsound null safety.
- The
--no-sound-null-safetyCLI option has been removed. -
The
Dart_NewListOfandDart_IsLegacyTypefunctions have been removed from the C API.
Released: 2024-08-06
The Dart_DefaultCanonicalizeUrl function has been removed from the C API.
3.4
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.
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.
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.
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.
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.
Released: 2024-05-14
Added improvements to the type analysis of conditional expressions, if-null expressions and assignments, and switch expressions.
Released: 2024-05-14
The pattern context type schema for cast patterns is now _ (the unknown
type) instead of Object?.
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.
dart:clidart:html, dart:indexed:db, dart:svg, dart:web_audo, dart:web_gl
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.
dart:jsReleased: 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.
dart:js_utilReleased: 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.
dart:ioReleased: 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.
dart:ioReleased: 2024-05-14
The FileSystemDeleteEvent.isDirectory property. It always returns false.
dart:typed_data
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.
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.
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.
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
Released: 2024-04-17
This patch release fixes an issue with JS interop in dart2wasm where @JS
annotations on enclosing libraries were incorrectly used.
Released: 2024-03-27
This patch release fixes a Dart VM crash on older Windows CPUs lacking SSE4.1.
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.
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.
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.
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.
patternsrecordsclass-modiferssealed-class
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.
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.
}
Released: 2024-02-15
Abstract getters are now promotable under the rules of private final field promotion, if there are no conflicting declarations.
dart:cliReleased: 2024-02-15
The waitFor function remains deprecated for another release and is set for
removal in Dart 3.4.
dart:ffiReleased: 2024-02-15
The elementAt pointer arithmetic methods on Pointer types are
deprecated. Migrate to the - and + operators instead.
dart:ffiReleased: 2024-02-15
The previously deprecated @FfiNative annotation has been removed. Usages
should be updated to use the @Native annotation.
dart:htmlReleased: 2024-02-15
Instead of using HttpRequest directly, it is now recommended to use
package:http.
dart:ioReleased: 2024-02-15
Instead of using HttpClient directly, it is now recommended to use
package:http.
dart:js_interop
dart:js_interop
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.
dart:js_interop
Released: 2024-02-15
JSArray and JSPromise now have generic parameters.
dart:js_interop
Released: 2024-02-15
Various extension members were moved or renamed. To learn about the updated
extensions, reference JSAnyUtilityExtension and JSAnyOperatorExtension.
dart:typed_data
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.
dart:nativewrappers
Released: 2024-02-15
All native wrapper classes are now marked base so that none of their
subtypes can be implemented.
Released: 2024-02-15
The Invocation that is passed to noSuchMethod no longer has a minified
memberName, even when compiled with --minify.
Released: 2024-02-15
Disallow importing legacy JS interop libraries. Prefer using
dart:js_interop and dart:js_interop_unsafe
instead.
Released: 2024-02-15
Invalid dart doc comment directives are now reported by the analyzer.
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_assertionunnecessary_castinvalid_null_aware_operator
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.
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_parametersavoid_returning_nullavoid_returning_null_for_future
3.2
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.
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.
Released: 2023-11-22
This patch release fixes bugs in dart doc generation, JSON array parsing
causing segfaults in flutter test, and upgrades DevTools.
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.
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:
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.
Released: 2023-11-15
Corrected inconsistencies in type promotion behavior of if-case statements where the value being matched against throws an exception.
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.
dart:clidart:convertReleased: 2023-11-15
Changed return types of utf8.encode() and Utf8Codec.encode() from
List<int> to Uint8List.
dart:developer
Released: 2023-11-15
Deprecated the Service.getIsolateID method.
dart:ffiReleased: 2023-11-15
Changed NativeCallable.nativeFunction so calls now throw an error if the
receiver is already closed, instead of returning nullptr.
dart:iodart:ioReleased: 2023-11-15
Inserted a space at the fold point of folded header values that
HttpClientResponse.headers and HttpRequest.headers
return.
dart:js_interop
Released: 2023-11-15
JSNumber.toDart in favor of toDartDouble and toDartInt.
dart:js_interop
Released: 2023-11-15
Object.toJS in favor of Object.toJSBox.
dart:js_interop
Released: 2023-11-15
Restricted external JS interop APIs using dart:js_interop to a set of
allowed types.
dart:js_interop
Released: 2023-11-15
Prohibited use of isNull and isUndefined on dart2wasm.
dart:js_interop
Released: 2023-11-15
Changed typeofEquals and instanceof APIs to both return bool instead of
JSBoolean. Also, typeofEquals now takes
String instead of JSString.
dart:js_interop
Released: 2023-11-15
Changed JSAny and JSObject types to only implementable, not extendable,
by user @staticInterop types.
dart:js_interop
Released: 2023-11-15
Changed JSArray.withLength to take int instead of JSNumber.
Released: 2023-11-15
Added interceptors for JavaScript Symbol and BigInt types; they should
no longer be used with package:js classes.
Released: 2023-11-15
Added interceptors for JavaScript Symbol and BigInt types; they should
no longer be used with package:js classes.
Released: 2023-11-15
Private final field promotion might cause the following analyzer warnings to trigger on existing code that previously passed analysis:
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
Released: 2023-10-25
This patch release fixes an issue affecting Dart compiled to JavaScript running in Node.js 21.
Released: 2023-10-18
This patch release fixes a Dart VM issue where variable values were not visible while debugging.
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.
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.
Released: 2023-09-07
This patch release fixes a parser bug that prevented nested record patterns from using destructuring shorthand syntax.
dart:async, dart:io
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.
dart:asyncReleased: 2023-08-16
Added interface modifier to purely abstract classes:
MultiStreamController, StreamConsumer, StreamIterator
and
StreamTransformer.
dart:iodart:ioReleased: 2023-08-16
FileSystemEvent is sealed. This means FileSystemEvent cannot be
extended or implemented.
dart:js_interop
Released: 2023-08-16
ObjectLiteral; create an object literal with no named members using
{}.jsify().
package:jsReleased: 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.
package:jsReleased: 2023-08-16
external @staticInterop members and external extension members will
generate slightly different JS code for methods that have optional
parameters.
3.0
Released: 2023-07-26
This patch release fixes a dart2js bug causing TypeError or
NoSuchMethodError when using records.
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.
Released: 2023-06-14
This patch release fixes a bad cast in the frontend causing dart2js crashes during Flutter web builds.
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.
Released: 2023-02-07
This patch release fixes AOT compiler crashes, pattern matching issues, adds
missing interface modifiers, and improves linter support.
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.
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.
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.
Released: 2023-05-10
Added support for patterns, a new category of grammar that lets you match and destructure values.
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.
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.
Released: 2023-05-10
Added support for switch expressions, a new form of multi-way branching allowed where expressions are expected.
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.
Released: 2023-05-10
Changed interpretation of switch cases from constant expressions to patterns.
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.
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.
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.
Released: 2023-05-10
The following existing classes have been made mixin classes: Iterable,
IterableMixin, IterableBase, ListMixin,
SetMixin, MapMixin,
LinkedListEntry, StringConversionSink.
dart:asyncReleased: 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,BidirectionalIteratorclasses and constants. + There errors were removed:AbstractClassInstantiationError,CyclicInitializationError,NullThrownError,FallThroughError,CastError(useTypeError),NoSuchMethodErrordefault constructor (useNoSuchMethod.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
dart:coredart:asyncdart:collection
dart:developer
Released: 2023-05-10
Removed the deprecated
MAX_USER_TAGS
constant. Use
maxUserTags
instead.
dart:developer
dart:developer
dart:ffiReleased: 2023-05-10
The @FfiNative annotation is now deprecated. Usages should be updated to
use the @Native annotation.
dart:htmlReleased: 2023-05-10
Removed the deprecated registerElement and registerElement2 methods in
Document and HtmlDocument.
dart:mathReleased: 2023-05-10
The Random interface can only be implemented, not extended.
dart:ioReleased: 2023-05-10
Updated NetworkProfiling to accommodate new String ids that are
introduced in vm_service:11.0.0
Released: 2023-05-10
The 3.0 release of the Dart SDK dropped support for language versions before 2.12.
2.19
Released: 2023-03-29
This patch release fixes a Dart VM crash when reading a defined but uninitialized static field.
Released: 2023-03-08
This patch release fixes VM crashes on mobile devices caused by specific RegExp usage.
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.
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.
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.
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.
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:
/// A really great test library.
@TestOn('browser')
library;
Released: 2023-01-25
Added more flow analysis flags for unreachable code cases.
Released: 2023-01-25
Report a compile-time error for all cyclic dependencies during top-level type inference.
dart:convertReleased: 2023-01-25
The previously deprecated API DEFAULT_BUFFER_SIZE in JsonUtf8Encoder has
been removed.
dart:developer
Released: 2023-01-25
Removed previously deprecated APIs kInvalidParams, kExtensionError,
kExtensionErrorMax, and kExtensionErrorMin
in
ServiceExtensionResponse.
dart:ffiReleased: 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.
dart:iodart:ioReleased: 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.
dart:ioReleased: 2023-01-25
Calling ResourceHandle.toFile(), ResourceHandle.toSocket(),
ResourceHandle.toRawSocket() or ResourceHandle.toRawDatagramSocket(),
more than once now throws a StateError.
dart:isolateReleased: 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.
dart:mirrorspackage:jsReleased: 2023-01-25
Breaking changes to the preview feature @staticInterop:
-
Disallowed classes with this annotation from using
externalgenerative 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
@JSannotation. - Classes with this annotation can not be implemented by classes without this annotation.
dart2js2.18
Released: 2022-11-23
This patch release fixes issues with private variable setters in mixins on web and type parameter nullability in factory constructors.
Released: 2022-09-28
This patch release fixes incorrect behavior in Uri.parse and a compiler
crash.
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.
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.
dart:ioReleased: 2022-08-30
Changed the uri property of RedirectException in dart:io to be
nullable.
dart:ioReleased: 2022-08-30
Removed constants in dart:io networking APIs following the
SCREAMING_CAPS convention.
dart:ioReleased: 2022-08-30
The Dart VM no longer automatically restores the initial terminal settings upon exit.
2.17
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.
Released: 2022-06-22
This patch release improves analysis of enums and switch statements, and
fixes a compiler crash when initializing Finalizable objects.
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.
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.
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.
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.
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.
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:
void main() {
test(skip: true, 'A test description', () {
// Very long function body here...
});
}
dart:iodart:ioReleased: 2022-05-11
Added new keyLog property to HttpClient, which allows TLS keys to be
logged for debugging purposes.
dart:iodart:ioReleased: 2022-05-11
Added a new allowLegacyUnsafeRenegotiation property to SecurityContext,
which allows TLS renegotiation for client secure sockets.
2.16
Released: 2022-03-24
This patch release fixes a dart2js crash when building some Flutter web apps.
Released: 2022-02-09
This patch release fixes an AOT precompiler crash when building some Flutter apps.
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.
dart:ioReleased: 2022-02-03
On Windows, Directory.rename will no longer delete a directory if
newPath specifies one. Instead, a FileSystemException
will be thrown.
dart:iodart:isolate2.15
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.
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.
Released: 2021-12-08
Improved support for function pointers, known as tear-offs. In particular, constructor tear-offs are now supported.
dart:ioReleased: 2021-12-08
Updated the SecurityContext class to set the minimum TLS protocol version
to TLS1_2_VERSION (1.2) instead of TLS1_VERSION.
dart:web_sqldart:htmlReleased: 2021-12-08
Removed window.openDatabase (related to dart:web_sql deletion above).
Released: 2021-12-08
Removed the standalone dartfmt tool.
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
Released: 2021-10-14
This patch release fixes a memory leak of analyzer plugins and issues with Dart VM loading expired certificates on Windows.
Released: 2021-09-30
This patch release fixes a code completion performance regression and debug information emitted by the Dart VM.
Released: 2021-09-16
This patch release fixes dartdoc crashes, error messages for >>> on older
language versions, and invalid pubspec.lock paths on Windows.
Released: 2021-09-09
This patch release fixes Dart commandline tool startup performance on macOS ARM64 (Apple Silicon).
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.
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.
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:
@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;
dart:ioReleased: 2021-09-08
The setter callbacks .authenticate and .authenticateProxy in
HttpClient must now accept a nullable realm
argument (for pre-migrated
null safe code).
dart:typed_data
Released: 2021-09-08
Most types exposed by this library can no longer be extended, implemented or mixed-in.
Released: 2021-09-08
Expandos, and the object parameters of Dart_NewWeakPersistentHandle and
Dart_NewFinalizableHandle, no longer accept Pointer
and subtypes of
Struct
Released: 2021-09-08
Deprecated the standalone dartfmt tool.
dart2jsReleased: 2021-09-08
dart2js no longer supports legacy browsers, because it emits ES6+
JavaScript by default.
Released: 2021-09-08
Changed subtyping relations of package:js classes to be more correct and
consistent with Dart2JS.
2.13
Released: 2021-06-28
This patch release fixes a Dart VM compiler crash and a DDC compiler crash.
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.
Released: 2021-05-25
This patch release fixes incorrect behavior in CastMap and missing
nullability from recursive type hierarchies in DDC.
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.
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.
dart:ffiReleased: 2021-05-19
Added support for inline arrays in FFI structs and packed structs.
package:jsReleased: 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
Released: 2021-04-15
This patch release fixes Dart VM compiler crashes when compiling initializers containing async closures.
Released: 2021-04-14
This patch release fixes a security vulnerability in dart:html related to
DOM clobbering (CVE-2021-22540).
Released: 2021-03-10
This patch release fixes an unhandled exception in HTTPS connections and a
typing issue in the typed_data + operator.
Released: 2021-03-03
Dart 2.12 introduces sound null safety, stable FFI, and many other new features and improvements across the platform.
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.
Released: 2021-03-03
Fixed an implementation bug where this would sometimes undergo type
promotion in extensions.
dart:ffidart:ffiReleased: 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>[]
dart:ffiReleased: 2021-03-03
Deprecated allocate in package:ffi, as it will no longer be able to
invoke sizeOf<T> generically.
dart:ffiReleased: 2021-03-03
Dart_WeakPersistentHandle no longer auto-deletes itself when the
referenced object is garbage collected to avoid race conditions.
Released: 2021-03-03
Renamed Dart_WeakPersistentHandleFinalizer to Dart_HandleFinalizer and
removed its handle argument.
2.10
Released: 2020-10-29
This patch release fixes breaking changes in Chrome 86 affecting DDC, compiler errors with positional parameters, and AOT compilation crashes.
Released: 2020-10-06
This patch release fixes crashes in Flutter applications, non-deterministic behavior, and uncaught TypeErrors in DDC.
Released: 2020-09-28
Dart 2.10 introduces a unified C API for the VM, Dart_FinalizableHandles,
and deferred loading of types in dart2js.
Released: 2020-10-01
Renamed dart_api_dl.cc to dart_api_dl.c and changed to a pure C file.
2.9
Released: 2020-08-26
Fixes transient StackOverflow exceptions when building Flutter applications.
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.
dart:convertReleased: 2020-08-05
When encoding a string containing unpaired surrogates as UTF-8, the unpaired
surrogates will be encoded as replacement characters (U+FFFD).
dart:convertReleased: 2020-08-05
When decoding UTF-8, encoded surrogates will be treated as malformed input.
dart:convertReleased: 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.
dart:htmlReleased: 2020-08-05
CssClassSet.add() and CssClassSet.toggle now return false instead of
null if the CssClassSet corresponds to multiple elements.
dart:mirrorsReleased: 2020-08-05
Web compilers (dart2js and DDC) now produce a compile-time error if
dart:mirrors is imported.
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).
Released: 2020-08-05
The Dart_StringToUTF8 function in the Dart API will convert unpaired
surrogates into replacement characters.
2.8
Released: 2020-05-28
Fixes crashes in Flutter apps, a stack trace regression, and constant re-canonicalization issues.
Released: 2020-05-13
Fixes an AOT compilation bug causing NoSuchMethod exceptions in global transformations.
Released: 2020-05-06
Prepares for non-nullable types with several breaking changes to core library APIs.
Released: 2020-05-06
Fixed an implementation bug where local variable inference would incorrectly use the promoted type of a type variable.
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.
dart:asyncReleased: 2020-05-06
Changed the return type of StreamSubscription.cancel() to Future<void>.
dart:asyncReleased: 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.
dart:asyncReleased: 2020-05-06
Errors passed to Completer.completeError(), Stream.addError(),
Future.error(), etc. can no longer be null.
dart:asyncdart:coreReleased: 2020-05-06
Three members on RuneIterator no longer return null when accessed before
the first call to moveNext().
dart:coreReleased: 2020-05-06
The String.fromEnvironment() default value for defaultValue is now an
empty string instead of null.
dart:coreReleased: 2020-05-06
The default value for int.fromEnvironment()'s defaultValue parameter is
now zero.
dart:ffiReleased: 2020-05-06
Changed Pointer.asFunction() and DynamicLibrary.lookupFunction() to
extension methods.
dart:iodart:ioReleased: 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.
dart:ioReleased: 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.
dart:ioReleased: 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.
dart:ioReleased: 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.
dart:ioReleased: 2020-05-06
The HeaderValue class now parses more strictly in two invalid edge cases.
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.
Released: 2020-05-06
Functions passed to JavaScript using the recommended package:js interop
specification must now be wrapped with a call to allowInterop.
Released: 2020-05-06
Constructors in @JS() classes must be marked with external.
dart2jsReleased: 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.
dart2jsdart2jsReleased: 2020-05-06
Constructors in @JS() classes must be marked with external.
dart2jsReleased: 2020-05-06
Completely removed the --package-root flag, which was hidden and disabled
in Dart 2.0.0.
2.7
Released: 2020-03-23
Fixes a security vulnerability in dart:html (CVE-2020-8923) and improves
ARMv8 compatibility.
Released: 2020-01-23
Improves dart2js compile-time and changes macOS SDK availability to x64 only.
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.
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:
extension ParseNumbers on String {
int parseInt() {
return int.parse(this);
}
}
​
void main() {
int i = '42'.parseInt();
print(i);
}
dart:ioReleased: 2019-12-11
Added IOOverrides.serverSocketBind to aid in writing tests that wish to
mock ServerSocket.bind.
2.6
Released: 2019-11-11
Reduces dart2js memory usage, improves ARM64 stability, and updates FFI documentation.
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.
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.
import 'dart:async';
​
void foo<T>(FutureOr<T> Function() f) { print(T); }
​
main() { foo(() {}); }
dart:ffiReleased: 2019-11-05
The API now makes use of static extension members.
dart:ffiReleased: 2019-11-05
Removed memory management Pointer.allocate and Pointer.free.
dart:ffiReleased: 2019-11-05
Pointer.offsetBy was removed, use cast and elementAt instead.
2.5
Released: 2019-09-10
Expands the set of operations allowed in constant expressions, including casts, type tests, and collection features.
dart:ffiReleased: 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.
dart:ioReleased: 2019-09-10
The Cookie class's constructor's name and value optional positional
parameters are now mandatory.
dart:ioReleased: 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.
2.4
Released: 2019-08-07
Fixes a performance regression in JIT mode and a potential AOT compiler crash.
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.
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:
class A<X> {};
class B<X> extends A<void Function(X)> {};
Released: 2019-06-27
You can now use async as an identifier in asynchronous and generator
functions.
dart:isolateReleased: 2019-06-27
Isolate.resolvePackageUri will always throw an UnsupportedError when
compiled with dart2js or DDC.
dart:asyncReleased: 2019-06-27
Fixed a bug in the StreamIterator class where await for allowed null
as a stream.
2.3
Released: 2019-06-11
Fixes a security vulnerability in Process.run on Linux and Android by not
searching the current directory.
Released: 2019-05-21
Fixes a dart2js compiler crash when compiling UI-as-code features within fields.
Released: 2019-05-08
Introduces UI-as-code features: spread operator (...), collection if,
and collection for.
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:
Widget build(BuildContext context) {
return Column(children: [
Header(),
...buildMainElements(),
Footer(),
]);
}
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:
Widget build(BuildContext context) {
return Column(children: [
Text(mainText),
if (page != pages.last)
FlatButton(child: Text('Next')),
]);
}
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:
Widget build(BuildContext context) {
return Column(children: [
Text(mainText),
for (var section in sections)
HeadingAction(section.heading),
]);
}
2.2
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.
Released: 2019-02-26
Added support for set literals using {}.
The following example creates a set of currencies:
const Set<String> currencies = {'EUR', 'USD', 'JPY'};
package:kernel
Released: 2019-02-26
The klass getter on the InstanceConstant class in the Kernel AST API has
been renamed to classNode for consistency.
package:kernel
Released: 2019-02-26
Updated Link implementation to utilize true symbolic links instead of
junctions on Windows.
2.1
Released: 2018-11-15
Fixes a soundness hole in dart:mirrors and adds a StateError when adding
to a closed IOSink.
dart:ioReleased: 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.
Released: 2018-11-15
Introduces int-to-double conversion, new mixin syntax, and various
static error checks.
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:
padding: const EdgeInsets.symmetric(
horizontal: 4,
vertical: 8,
)
Released: 2018-11-15
A number of static errors that should have been detected and reported were not supported in 2.0.0. These are reported now, which means existing incorrect code might show new errors:
- Mixins must correctly override their superclasses.
- Implicit type arguments in extends clauses must satisfy the class bounds.
- Instance members should shadow prefixes.
-
Constructor invocations must use valid syntax, even with optional
new. - Type arguments to generic typedefs must satisfy their bounds.
- Classes can't implement FutureOr.
- Abstract methods may not unsoundly override a concrete method.
- Constant constructors cannot redirect to non-constant constructors.
- Setters with the same name as the enclosing class aren't allowed.
dart2jsReleased: 2018-11-15
Duplicate keys in a const map are not allowed and produce a compile-time error.
2.0
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.
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.
Released: 2018-02-22
Functions marked async now run synchronously until the first await
statement.
Released: 2018-02-22
Renamed constants in the core libraries from SCREAMING_CAPS to
lowerCamelCase.
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.
Released: 2018-02-22
dart:isolate and dart:mirrors are no longer supported when using Dart
for the web.
Released: 2018-02-22
Replaced pub's transformer-based build system with a new build system.
Type
Area
Version
Unless stated otherwise, the documentation on this site reflects Dart 3.10.3. Page last updated on 2026-1-20. View source or report an issue.