meta
Annotations used to express developer intentions that can't otherwise be deduced by statically analyzing source code.
1.19.0
13M downloads/mo
#5 most downloaded on pub.dev
dart-lang/sdk
What this package is like to depend on
Last release 1 months ago
09 Jul 2026
Release timing varies
gaps range from 2 weeks to 8 months
Some releases are documented
notes for 40 of 112 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
119 releases · first in 2012
5 releases in the last 12 months
see the full history below
Release timeline
119 releases · Nov 2012 to Jul 2026Releases
latest 60 of 119-
1.19.009 Jul 2026Release notes
Open source →Language changes
- The language now allows a trailing comma after the last argument of a call and the last parameter of a function declaration. This can make long argument or parameter lists easier to maintain, as commas can be left as-is when reordering lines. For details, see SDK issue 26644.
Tool Changes
-
dartfmt- upgraded to v0.2.9+1- Support trailing commas in argument and parameter lists.
- Gracefully handle read-only files.
- About a dozen other bug fixes.
-
Pub
-
Added a
--no-packages-dirflag topub get,pub upgrade, andpub downgrade. When this flag is passed, pub will not generate apackages/directory, and will remove that directory and any symlinks to it if they exist. Note that this replaces the unsupported--no-package-symlinksflag. -
Added the ability for packages to declare a constraint on the Flutter SDK:
environment: flutter: ^0.1.2 sdk: >=1.19.0 <2.0.0A Flutter constraint will only be satisfiable when pub is running in the context of the
flutterexecutable, and when the Flutter SDK version matches the constraint. -
Added
sdkas a new package source that fetches packages from a hard-coded SDK. Currently only theflutterSDK is supported:dependencies: flutter_driver: sdk: flutter version: ^0.0.1A Flutter
sdkdependency will only be satisfiable when pub is running in the context of theflutterexecutable, and when the Flutter SDK contains a package with the given name whose version matches the constraint. -
tarfiles on Linux are now created with0as the user and group IDs. This fixes a crash when publishing packages while using Active Directory. -
Fixed a bug where packages from a hosted HTTP URL were considered the same as packages from an otherwise-identical HTTPS URL.
-
Fixed timer formatting for timers that lasted longer than a minute.
-
Eliminate some false negatives when determining whether global executables are on the user's executable path.
-
-
dart2jsdart2dart(akadart2js --output-type=dart) has been removed (this was deprecated in Dart 1.11).
Dart VM
- The dependency on BoringSSL has been rolled forward. Going forward, builds of the Dart VM including secure sockets will require a compiler with C++11 support. For details, see the Building wiki page.
Strong Mode
-
New feature - an option to disable implicit casts (SDK issue 26583), see the documentation for usage instructions and examples.
-
New feature - an option to disable implicit dynamic (SDK issue 25573), see the documentation for usage instructions and examples.
-
Breaking change - infer generic type arguments from the constructor invocation arguments (SDK issue 25220).
var map = new Map<String, String>(); // infer: Map<String, String> var otherMap = new Map.from(map); -
Breaking change - infer local function return type (SDK issue 26414).
void main() { // infer: return type is int f() { return 40; } int y = f() + 2; // type checks print(y); } -
Breaking change - allow type promotion from a generic type parameter (SDK issue 26414).
void fn/*<T>*/(/*=T*/ object) { if (object is String) { // Treat `object` as `String` inside this block. // But it will require a cast to pass it to something that expects `T`. print(object.substring(1)); } } -
Breaking change - smarter inference for Future.then (SDK issue 25944). Previous workarounds that use async/await or
.then/*<Future<SomeType>>*/should no longer be necessary.// This will now infer correctly. Future<List<int>> t2 = f.then((_) => [3]); // This infers too. Future<int> t2 = f.then((_) => new Future.value(42)); -
Breaking change - smarter inference for async functions (SDK issue 25322).
void test() async { List<int> x = await [4]; // was previously inferred List<int> y = await new Future.value([4]); // now inferred too } -
Breaking change - sideways casts are no longer allowed (SDK issue 26120).
Release notes
Open source →- The
@RecordUse()and@mustBeConstannotations are no longer considered experimental.
-
1.18.304 Jun 2026Release notes
Open source →- One new TargetKind is introduced:
TargetKind.importDirective, which indicates an annotation is valid on an import directive.
- One new TargetKind is introduced:
-
1.18.217 Mar 2026Release notes
Open source →- Change private types in the public API signatures to
Object. - Update documentation to follow the "single line first paragraph" style.
- Make
visibleForTestingdocumentation match actual behavior: The annotated member can be used in thetest/directory of other packages.
- Change private types in the public API signatures to
-
1.18.127 Jan 2026 -
1.18.015 Jan 2026Release notes
Open source →Core library changes
dart:core- Improved performance when parsing some common URIs.
- Fixed bug in
Uri.resolve(SDK issue 26804).
dart:io- Adds file locking modes
FileLock.BLOCKING_SHAREDandFileLock.BLOCKING_EXCLUSIVE.
- Adds file locking modes
Release notes
Open source →- The
@redeclareannotation is no longer considered experimental. - Two new TargetKinds are introduced:
TargetKind.exportDirective, which indicates an annotation is valid on an export directive, andTargetKind.partOfDirective, which indicates an annotation is valid on a "part of" directive. - The
TargetKind.directivevalue is deprecated in favor of the above new TargetKinds and the existingTargetKind.library.
-
1.17.014 May 2025Release notes
Open source →Core library changes
-
dart:convert- Deprecate
ChunkedConverterwhich was erroneously added in 1.16.
- Deprecate
-
dart:coreUri.replacesupports iterables as values for the query parameters.Uri.parseIPv6Addressreturns aUint8List.
-
dart:io- Added
NetworkInterface.listSupported, which istruewhenNetworkInterface.listis supported, andfalseotherwise. Currently,NetworkInterface.listis not supported on Android.
- Added
Tool Changes
-
Pub
-
TAR files created while publishing a package on Mac OS and Linux now use a more portable format.
-
Errors caused by invalid arguments now print the full usage information for the command.
-
SDK constraints for dependency overrides are no longer considered when determining the total SDK constraint for a lockfile.
-
A bug has been fixed in which a lockfile was considered up-to-date when it actually wasn't.
-
A bug has been fixed in which
pub get --offlinewould crash when a prerelease version was selected.
-
-
Dartium and content shell
- Debugging Dart code inside iframes improved, was broken.
Release notes
Open source →-
Introduce
@awaitNotRequiredto annotateFuture-returning functions andFuture-typed fields and top-level variables whose value does not necessarily need to be awaited. This annotation can be used to suppressunawaited_futuresanddiscarded_futureslint diagnostics at call sites.For example, this
logfunction returns aFuture, but maybe the return value is typically not important, and is only useful in tests or while debugging:@awaitNotRequired Future<LogMessage> log(String message) { ... } void fn() { log('Message'); // Not important to wait for logging to complete. }Without the annotation on
log, the analyzer may report a lint diagnostic at the call tolog, such asunawaited_futuresordiscarded_futuresregarding the danger of not awaiting the function call, depending on what lint rules are enabled. -
Mark
Requiredandrequiredas@Deprecated. -
Update SDK constraints to
^3.5.0.
-
-
1.16.019 Sep 2024Release notes
Open source →Core library changes
-
dart:convert-
Added
BASE64URLcodec and correspondingBase64Codec.urlSafeconstructor. -
Introduce
ChunkedConverterand deprecate chunked methods onConverter.
-
-
dart:htmlThere have been a number of BREAKING changes to align APIs with recent changes in Chrome. These include:
-
Chrome's
ShadowRootinterface no longer has the methodsgetElementById,getElementsByClassName, andgetElementsByTagName, e.g.,elem.shadowRoot.getElementsByClassName('clazz')should become:
elem.shadowRoot.querySelectorAll('.clazz') -
The
clipboardDataproperty has been removed fromKeyEventandEvent. It has been moved to the newClipboardEventclass, which is now used bycopy,cut, andpasteevents. -
The
layerproperty has been removed fromKeyEventandUIEvent. It has been moved toMouseEvent. -
The
Point get pageproperty has been removed fromUIEvent. It still exists onMouseEventandTouch.
There have also been a number of other additions and removals to
dart:html,dart:indexed_db,dart:svg,dart:web_audio, anddart:web_glthat correspond to changes to Chrome APIs between v39 and v45. Many of the breaking changes represent APIs that would have caused runtime exceptions when compiled to JavaScript and run on recent Chrome releases. -
-
dart:io- Added
SecurityContext.alpnSupported, which is true if a platform supports ALPN, and false otherwise.
- Added
JavaScript interop
For performance reasons, a potentially BREAKING change was added for libraries that use JS interop. Any Dart file that uses
@JSannotations on declarations (top-level functions, classes or class members) to interop with JavaScript code will require that the file have the annotation@JS()on a library directive.@JS() library my_library;The analyzer will enforce this by generating the error:
The
@JS()annotation can only be used if it is also declared on the library directive.If part file uses the
@JS()annotation, the library that uses the part should have the@JS()annotation e.g.,// library_1.dart @JS() library library_1; import 'package:js/js.dart'; part 'part_1.dart';// part_1.dart part of library_1; @JS("frameworkStabilizers") external List<FrameworkStabilizer> get frameworkStabilizers;If your library already has a JS module e.g.,
@JS('array.utils') library my_library;Then your library will work without any additional changes.
Analyzer
-
Static checking of
for instatements. These will now produce static warnings:// Not Iterable. for (var i in 1234) { ... } // String cannot be assigned to int. for (int n in <String>["a", "b"]) { ... }
Tool Changes
-
Pub
-
pub servenow provides caching headers that should improve the performance of requesting large files multiple times. -
Both
pub getandpub upgradenow have a--no-precompileflag that disables precompilation of executables and transformed dependencies. -
pub publishnow resolves symlinks when publishing from a Git repository. This matches the behavior it always had when publishing a package that wasn't in a Git repository.
-
-
Dart Dev Compiler
-
The experimental
dartdevcexecutable has been added to the SDK. -
It will help early adopters validate the implementation and provide feedback.
dartdevcis not yet ready for production usage. -
Read more about the Dart Dev Compiler here.
-
Release notes
Open source →-
Add
TargetKinds to a few annotations to match custom-wired behavior that the Dart analyzer has been providing:- Require that
@factoryis only used on methods. - Require that
@Immutableis only used on classes, extensions, and mixins. - Require that
@mustBeOverriddenand@mustCallSuperare only used on overridable members. - Require that
@sealedis only used on classes.
- Require that
-
Updated
@doNotSubmitto (1) disallow same-library access (unlike other visibility annotation), (2) allow parameters marked with@doNotSubmitto be used in nested functions, and (3) disallowed@doNotSubmiton required parameters:import 'package:meta/meta.dart'; @doNotSubmit void a() {} void b() { // HINT: invalid_use_of_do_not_submit: ... a(); }import 'package:meta/meta.dart'; void test({ @doNotSubmit bool solo = false }) { void nested() { // OK if (solo) { /*...*/ } } }import 'package:meta/meta.dart'; void test({ // HINT: Cannot use on required parameters. @doNotSubmit required bool solo }) {}See https://github.com/dart-lang/sdk/issues/55558 for more information.
-
TargetKind.parameteris now allowed on a representation type, such as:// Ok, because `int _actual` is similar to a parameter declaration. extension type const FancyInt(@mustBeConst int _actual) {} -
Renamed
@ResourceIdentifierto@RecordUse.
-
-
1.15.007 May 2024Release notes
Open source →Core library changes
-
dart:async- Made
StreamViewclass aconstclass.
- Made
-
dart:core- Added
Uri.queryParametersAllto handle multiple query parameters with the same name.
- Added
-
dart:io- Added
SecurityContext.usePrivateKeyBytes,SecurityContext.useCertificateChainBytes,SecurityContext.setTrustedCertificatesBytes, andSecurityContext.setClientAuthoritiesBytes. - Breaking The named
directoryargument ofSecurityContext.setTrustedCertificateshas been removed. - Added support to
SecurityContextfor PKCS12 certificate and key containers. - All calls in
SecurityContextthat accept certificate data now accept an optional named parameterpassword, similar toSecurityContext.usePrivateKeyBytes, for use as the password for PKCS12 data.
- Added
Tool changes
-
Dartium and content shell
- The Chrome-based tools that ship as part of the Dart SDK - Dartium and content shell - are now based on Chrome version 45 (instead of Chrome 39).
- Dart browser libraries (
dart:html,dart:svg, etc) have not been updated.- These are still based on Chrome 39.
- These APIs will be updated in a future release.
- Note that there are experimental APIs which have changed in the underlying
browser, and will not work with the older libraries. For example,
Element.animate.
-
dartfmt- upgraded to v0.2.4- Better handling for long collections with comments.
- Always put member metadata annotations on their own line.
- Indent functions in named argument lists with non-functions.
- Force the parameter list to split if a split occurs inside a function-typed parameter.
- Don't force a split for before a single named argument if the argument itself splits.
Service protocol changes
- Fixed a documentation bug where the field
extensionRPCsinIsolatewas not marked optional.
Experimental language features
-
Added support for configuration-specific imports. On the VM and
dart2js, they can be enabled with--conditional-directives.The analyzer requires additional configuration:
analyzer: language: enableConditionalDirectives: trueRead about configuring the analyzer for more details.
Release notes
Open source →-
Updated
@mustBeOverriddento only flag missing overrides in concrete classes; in other words, abstract classes (including implicitly abstract, i.esealed) and mixin declarations are no longer required to provide an implementation:import 'package:meta/meta.dart'; abstract class Base { @mustBeOverridden void foo() {} } class Derived extends Base { // ERROR: Missing implementation of `foo`. } abstract class Abstract extends Base { // No error. } sealed class Sealed extends Base { // No error. } mixin Mixin on Base { // No error. }See https://github.com/dart-lang/sdk/issues/52965 for more information.
-
Introduce
TargetKind.optionalParameter, to indicate that an annotation is valid on any optional parameter declaration. -
Introduce
TargetKind.overridableMember, to indicate that an annotation is valid on any instance member declaration. -
Introduce
TargetKind.instanceMember, to indicate that an annotation is valid on any instance member declaration. -
Updated
@doNotSubmitto (1) disallow same-library access (unlike other visibility annotation), (2) allow parameters marked with@doNotSubmitto be used in nested functions, and (3) disallowed@doNotSubmiton required parameters:import 'package:meta/meta.dart'; @doNotSubmit void a() {} void b() { // HINT: invalid_use_of_do_not_submit: ... a(); }import 'package:meta/meta.dart'; void test({ @doNotSubmit bool solo = false }) { void nested() { // OK if (solo) { /*...*/ } } }import 'package:meta/meta.dart'; void test({ // HINT: Cannot use on required parameters. @doNotSubmit required bool solo }) {}See https://github.com/dart-lang/sdk/issues/55558 for more information.
-
-
1.14.004 Apr 2024Release notes
Open source →Core library changes
-
dart:async- Added
Future.anystatic method. - Added
Stream.fromFuturesconstructor.
- Added
-
dart:convertBase64Decoder.convertnow takes optionalstartandendparameters.
-
dart:core- Added
currentgetter toStackTraceclass. Uriclass added support for data URIs- Added two new constructors:
dataFromBytesanddataFromString. - Added a
datagetter fordata:URIs with a newUriDataclass for the return type.
- Added two new constructors:
- Added
growableparameter toList.filledconstructor. - Added microsecond support to
DateTime:DateTime.microsecond,DateTime.microsecondsSinceEpoch, andnew DateTime.fromMicrosecondsSinceEpoch.
- Added
-
dart:mathRandomadded asecureconstructor returning a cryptographically secure random generator which reads from the entropy source provided by the embedder for every generated random value.
-
dart:ioPlatformadded a staticisIOSgetter andPlatform.operatingSystemmay now returnios.Platformadded a staticpackageConfiggetter.- Added support for WebSocket compression as standardized in RFC 7692.
- Compression is enabled by default for all WebSocket connections.
- The optionally named parameter
compressionon the methodsWebSocket.connect,WebSocket.fromUpgradedSocket, andWebSocketTransformer.upgradeand theWebSocketTransformerconstructor can be used to modify or disable compression using the newCompressionOptionsclass.
- The optionally named parameter
-
dart:isolate- Added experimental support for Package Resolution Configuration.
- Added
packageConfigandpackageRootinstance getters toIsolate. - Added a
resolvePackageUrimethod toIsolate. - Added named arguments
packageConfigandautomaticPackageResolutionto theIsolate.spawnUriconstructor.
- Added
- Added experimental support for Package Resolution Configuration.
Tool changes
-
dartfmt-
Better line splitting in a variety of cases.
-
Other optimizations and bug fixes.
-
-
Pub
-
Breaking: Pub now eagerly emits an error when a pubspec's "name" field is not a valid Dart identifier. Since packages with non-identifier names were never allowed to be published, and some of them already caused crashes when being written to a
.packagesfile, this is unlikely to break many people in practice. -
Breaking: Support for
barbackversions prior to 0.15.0 (released July- has been dropped. Pub will no longer install these older barback versions.
-
pub servenow GZIPs the assets it serves to make load times more similar to real-world use-cases. -
pub depsnow supports a--no-devflag, which causes it to emit the dependency tree as it would be if nodev_dependencieswere in use. This makes it easier to see your package's dependency footprint as your users will experience it. -
pub global runnow detects when a global executable's SDK constraint is no longer met and errors out, rather than trying to run the executable anyway. -
Pub commands that check whether the lockfile is up-to-date (
pub run,pub deps,pub serve, andpub build) now do additional verification. They ensure that any path dependencies' pubspecs haven't been changed, and they ensure that the current SDK version is compatible with all dependencies. -
Fixed a crashing bug when using
pub global runon a global script that didn't exist. -
Fixed a crashing bug when a pubspec contains a dependency without a source declared.
-
Release notes
Open source →-
Introduce
TargetKind.constructor, to indicate that an annotation is valid on any constructor declaration. -
Introduce
TargetKind.directive, to indicate that an annotation is valid on any directive. -
Introduce
TargetKind.enumValue, to indicate that an annotation is valid on any enum value declaration. -
Introduce
TargetKind.typeParameter, to indicate that an annotation is valid on any type parameter declaration. -
Introduce
@doNotSubmitto annotate members that should not be accessed in checked-in code, typically because they are intended to be used ephemerally during development.One example is
package:test'ssolo: ...parameter, which skips all other tests in a test suite when set totrue. This parameter is useful during development, but should be prevented from being submitted:import 'package:meta/meta.dart'; void test( String name, void Function() body, { @doNotSubmit bool solo = false }) { // ... }import 'package:test/test.dart'; void main() { test( 'my test', () { // ... }, // HINT: invalid_use_of_do_not_submit: ... solo: true, ); } -
Introduce
@mustBeConstto annotate parameters which only accept constant arguments.
-
-
1.12.006 Feb 2024Release notes
Open source →Language changes
- Null-aware operators
??: if null operator.expr1 ?? expr2evaluates toexpr1if notnull, otherwiseexpr2.??=: null-aware assignment.v ??= exprcausesvto be assignedexpronly ifvisnull.x?.p: null-aware access.x?.pevaluates tox.pifxis notnull, otherwise evaluates tonull.x?.m(): null-aware method invocation.x?.m()invokesmonly ifxis notnull.
Core library changes
-
dart:asyncStreamControlleradded setters for theonListen,onPause,onResumeandonCancelcallbacks.
-
dart:convertLineSplitteradded asplitstatic method returning anIterable.
-
dart:coreUriclass now perform path normalization when a URI is created. This removes most..and.sequences from the URI path. Purely relative paths (no scheme or authority) are allowed to retain some leading "dot" segments. Also addedhasAbsolutePath,hasEmptyPath, andhasSchemeproperties.
-
dart:developer- New
logfunction to transmit logging events to Observatory.
- New
-
dart:htmlNodeTreeSanitizeradded theconst trustedfield. It can be used instead of defining aNullTreeSanitizerclass when callingsetInnerHtmlor other methods that create DOM from text. It is also more efficient, skipping the creation of aDocumentFragment.
-
dart:io -
dart:isolate- Added
onError,onExitanderrorsAreFatalparameters toIsolate.spawnUri.
- Added
-
dart:mirrorsInstanceMirror.delegatemoved up toObjectMirror.- Fix InstanceMirror.getField optimization when the selector is an operator.
- Fix reflective NoSuchMethodErrors to match their non-reflective counterparts when due to argument mismatches. (VM only)
Tool changes
-
Documentation tools
-
dartdocis now the default tool to generate static HTML for API docs. Learn more. -
docgenanddartdocgenhave been deprecated. Currently plan is to remove them in 1.13.
-
-
Formatter (
dartfmt)-
Over 50 bugs fixed.
-
Optimized line splitter is much faster and produces better output on complex code.
-
-
Observatory
-
Allocation profiling.
-
New feature to display output from logging.
-
Heap snapshot analysis works for 64-bit VMs.
-
Improved ability to inspect typed data, regex and compiled code.
-
Ability to break on all or uncaught exceptions from Observatory's debugger.
-
Ability to set closure-specific breakpoints.
-
'anext' - step past await/yield.
-
Preserve when a variable has been expanded/unexpanded in the debugger.
-
Keep focus on debugger input box whenever possible.
-
Echo stdout/stderr in the Observatory debugger. Standalone-only so far.
-
Minor fixes to service protocol documentation.
-
-
Pub
-
Breaking: various commands that previously ran
pub getimplicitly no longer do so. Instead, they merely check to make sure the ".packages" file is newer than the pubspec and the lock file, and fail if it's not. -
Added support for
--verbosity=errorand--verbosity=warning. -
pub servenow collapses multiple GET requests into a single line of output. For full output, use--verbose. -
pub depshas improved formatting for circular dependencies on the entrypoint package. -
pub runandpub global run-
Breaking: to match the behavior of the Dart VM, executables no longer run in checked mode by default. A
--checkedflag has been added to run them in checked mode manually. -
Faster start time for executables that don't import transformed code.
-
Binstubs for globally-activated executables are now written in the system encoding, rather than always in
UTF-8. To update existing executables, runpub cache repair.
-
-
pub getandpub upgrade-
Pub will now generate a ".packages" file in addition to the "packages" directory when running
pub getor similar operations, per the package spec proposal. Pub now has a--no-package-symlinksflag that will stop "packages" directories from being generated at all. -
An issue where HTTP requests were sometimes made even though
--offlinewas passed has been fixed. -
A bug with
--offlinethat caused an unhelpful error message has been fixed. -
Pub will no longer time out when a package takes a long time to download.
-
-
pub publish-
Pub will emit a non-zero exit code when it finds a violation while publishing.
-
.gitignorefiles will be respected even if the package isn't at the top level of the Git repository.
-
-
Barback integration
-
A crashing bug involving transformers that only apply to non-public code has been fixed.
-
A deadlock caused by declaring transformer followed by a lazy transformer (such as the built-in
$dart2jstransformer) has been fixed. -
A stack overflow caused by a transformer being run multiple times on the package that defines it has been fixed.
-
A transformer that tries to read a nonexistent asset in another package will now be re-run if that asset is later created.
-
-
VM Service Protocol Changes
-
BREAKING The service protocol now sends JSON-RPC 2.0-compatible server-to-client events. To reflect this, the service protocol version is now 2.0.
-
The service protocol now includes a
"jsonrpc"property in its responses, as opposed to"json-rpc". -
The service protocol now properly handles requests with non-string ids. Numeric ids are no longer converted to strings, and null ids now don't produce a response.
-
Some RPCs that didn't include a
"jsonrpc"property in their responses now include one.
Release notes
Open source →- Introduce the
@ResourceIdentifierexperimental annotation for static methods whose constant literal arguments should be collected during compilation. - Indicate that
@requiredand@Requiredare set to be deprecated for later removal.
- Null-aware operators
-
1.11.010 Oct 2023Release notes
Open source →Core library changes
-
dart:coreIterableadded anemptyconstructor. dcf0286Iterablecan now be extended directly. An alternative to extendingIterableBasefromdart:collection.Listadded anunmodifiableconstructor. r45334Mapadded anunmodifiableconstructor. r45733intadded agcdmethod. a192ef4intadded amodInversemethod. f6f338cStackTraceadded afromStringconstructor. 68dd6f6Uriadded adirectoryconstructor. d8dbb4a- List iterators may not throw
ConcurrentModificationErroras eagerly in release mode. In checked mode, the modification check is still as eager as possible. r45198
-
dart:developer- NEW- Replaces the deprecated
dart:profilerlibrary. - Adds new functions
debuggerandinspect. 6e42aec
- Replaces the deprecated
-
dart:io -
dart:htmlElementmethods,appendHtmlandinsertAdjacentHtmlnow takenodeValidatorandtreeSanitizerparameters, and the inputs are consistently sanitized. r45818 announcement
-
dart:isolate- BREAKING The positional
priorityparameter ofIsolate.pingandIsolate.killis now a named parameter namedpriority. - BREAKING Removed the
Isolate.AS_EVENTpriority. IsolatemethodspingandaddOnExitListenernow have a named parameterresponse. r45092Isolate.spawnUriadded a named argumentchecked.- Remove the experimental state of the API.
- BREAKING The positional
-
dart:profiler- DEPRECATED- This library will be removed in 1.12. Use
dart:developerinstead.
- This library will be removed in 1.12. Use
Tool changes
- This is the first release that does not include the Eclipse-based Dart Editor. See dart.dev/tools for alternatives.
- This is the last release that ships the (unsupported) dart2dart (aka
dart2js --output-type=dart) utility as part of dart2js
Release notes
Open source →- Introduce
TargetKind.extensionTypeto indicate that an annotation is valid on any extension type declaration.
-
-
1.10.006 Sep 2023Release notes
Open source →Core library changes
-
dart:convert -
dart:coreUri.parseaddedstartandendpositional arguments.
-
dart:html- POTENTIALLY BREAKING
CssClassSetmethod arguments must now be 'tokens', i.e. non-empty strings with no white-space characters. The implementation was incorrect for class names containing spaces. The fix is to forbid spaces and provide a faster implementation. Announcement
- POTENTIALLY BREAKING
-
dart:ioProcessResultnow exposes a constructor.importandIsolate.spawnUrinow supports the Data URI scheme on the VM.
Tool Changes
pub
-
Running
pub run foowithin a package now runs thefooexecutable defined by thefoopackage. The previous behavior ranbin/foo. This makes it easy to run binaries in dependencies, for instancepub run test. -
On Mac and Linux, signals sent to
pub runand forwarded to the child command.
Release notes
Open source →- Introduce
@redeclareto annotate extension type members that redeclare members from a superinterface. - Migrate the
TargetKindenum to a class to ease the addition of new kinds.
-
-
1.9.122 Mar 2023Release notes
Open source →Language changes
-
Support for
async,await,sync*,async*,yield,yield*, andawait for. See the the language tour for more details. -
Enum support is fully enabled. See the language tour for more details.
Tool changes
-
The formatter is much more comprehensive and generates much more readable code. See its tool page for more details.
-
The analysis server is integrated into the IntelliJ plugin and the Dart editor. This allows analysis to run out-of-process, so that interaction remains smooth even for large projects.
-
Analysis supports more and better hints, including unused variables and unused private members.
Core library changes
Highlights
-
There's a new model for shared server sockets with no need for a
Socketreference. -
A new, much faster regular expression engine.
-
The Isolate API now works across the VM and
dart2js.
Details
For more information on any of these changes, see the corresponding documentation on the Dart API site.
-
dart:async:-
Future.waitadded a new named argument,cleanUp, which is a callback that releases resources allocated by a successfulFuture. -
The
SynchronousStreamControllerclass was added as an explicit name for the type returned when thesyncargument is passed tonew StreamController.
-
-
dart:collection: Thenew SplayTreeSet.from(Iterable)constructor was added. -
dart:convert:Utf8Encoder.convertandUtf8Decoder.convertadded optionalstartandendarguments. -
dart:core:-
RangeErroradded new static helper functions:checkNotNegative,checkValidIndex,checkValidRange, andcheckValueInInterval. -
intadded themodPowfunction. -
Stringadded thereplaceFirstMappedandreplaceRangefunctions.
-
-
dart:io:-
Support for locking files to prevent concurrent modification was added. This includes the
File.lock,File.lockSync,File.unlock, andFile.unlockSyncfunctions as well as theFileLockclass. -
Support for starting detached processes by passing the named
modeargument (aProcessStartMode) toProcess.start. A process can be fully attached, fully detached, or detached except for its standard IO streams. -
HttpServer.bindandHttpServer.bindSecureadded thev6Onlynamed argument. If this is true, only IPv6 connections will be accepted. -
HttpServer.bind,HttpServer.bindSecure,ServerSocket.bind,RawServerSocket.bind,SecureServerSocket.bindandRawSecureServerSocket.bindadded thesharednamed argument. If this is true, multiple servers or sockets in the same Dart process may bind to the same address, and incoming requests will automatically be distributed between them. -
Deprecation: the experimental
ServerSocketReferenceandRawServerSocketReferenceclasses, as well as getters that returned them, are marked as deprecated. Thesharednamed argument should be used instead. These will be removed in Dart 1.10. -
Socket.connectandRawSocket.connectadded thesourceAddressnamed argument, which specifies the local address to bind when making a connection. -
The static
Process.killPidmethod was added to kill a process with a given PID. -
Stdoutadded thenonBlockinginstance property, which returns a non-blockingIOSinkthat writes to standard output.
-
-
dart:isolate:-
The static getter
Isolate.currentwas added. -
The
IsolatemethodsaddOnExitListener,removeOnExitListener,setErrorsFatal,addOnErrorListener, andremoveOnErrorListenernow work on the VM. -
Isolates spawned via
Isolate.spawnnow allow most objects, including top-level and static functions, to be sent between them.
-
-
-
1.9.030 Jan 2023Release notes
Open source →- Introduce
@reopento annotate class or mixin declarations that can safely extend classes markedbase,finalorinterface. - Introduce
@MustBeOverriddento annotate class or mixin members which must be overridden in all subclasses. - Deprecate
@alwaysThrows, which can be replaced by using a return type of 'Never'.
- Introduce
-
1.8.018 May 2022Release notes
Open source →-
dart:collection:SplayTreeadded thetoSetfunction. -
dart:convert: TheJsonUtf8Encoderclass was added. -
dart:core:-
The
IndexErrorclass was added for errors caused by an index being outside its expected range. -
The
new RangeError.indexconstructor was added. It forwards tonew IndexError. -
RangeErroradded three new properties.invalidPropertyis the value that caused the error, andstartandendare the minimum and maximum values that the value is allowed to assume. -
new RangeError.valueandnew RangeError.rangeadded an optionalmessageargument. -
The
new String.fromCharCodesconstructor added optionalstartandendarguments.
-
-
dart:io:-
Support was added for the Application-Layer Protocol Negotiation extension to the TLS protocol for both the client and server.
-
SecureSocket.connect,SecureServerSocket.bind,RawSecureSocket.connect,RawSecureSocket.secure,RawSecureSocket.secureServer, andRawSecureServerSocket.bindadded asupportedProtocolsnamed argument for protocol negotiation. -
RawSecureServerSocketadded asupportedProtocolsfield. -
RawSecureSocketandSecureSocketadded aselectedProtocolfield which contains the protocol selected during protocol negotiation.
-
Release notes
Open source →- Add
@UseResult.unless. - The mechanism behind
noInlineandtryInlinefromdart2js.darthas been changed. This should not affect the use of these annotations in practice.
-
-
1.7.007 Jul 2021Release notes
Open source →Tool changes
-
pubnow generates binstubs for packages that are globally activated so that they can be put on the user'sPATHand used as normal executables. See thepub global activatedocumentation. -
When using
dart2js, deferred loading now works with multiple Dart apps on the same page.
Core library changes
-
dart:async:Zone,ZoneDelegate, andZoneSpecificationadded theerrorCallbackfunction, which allows errors that have been programmatically added to aFutureorStreamto be intercepted. -
dart:io:-
Breaking change:
HttpClient.closemust be called for all clients or they will keep the Dart process alive until they time out. This fixes the handling of persistent connections. Previously, the client would shut down immediately after a request. -
Breaking change:
HttpServerno longer compresses all traffic by default. The newautoCompressproperty can be set totrueto re-enable compression.
-
-
dart:isolate:Isolate.spawnUriadded the optionalpackageRootargument, which controls how it resolvespackage:URIs.
Release notes
Open source →- Restore
TargetKindExtensionandget displayString. We publishedanalyzer 1.7.2that is compatible withTargetKindExtension.
-
-
1.6.003 Jul 2021Release notes
Open source →- Remove
TargetKindExtension. Adding it was a breaking change, because there are clients, e.g.analyze 1.7.0, that also declare an extension onTargetKind, and also declareget displayString. This causes a conflict.
- Remove
-
1.5.002 Jul 2021 -
1.4.025 May 2021Release notes
Open source →- Introduce
TargetKind.topLevelVariablethat indicates that an annotation is valid on any top-level variable declaration. - Introduce
@useResultto annotate methods, fields, or getters that return values that should be used - stored, passed as arguments, etc. - Updates for documentation.
- Introduce
-
1.3.002 Feb 2021 -
1.3.0-nullsafety.603 Nov 2020 pre-releaseRelease notes
Open source →- Update SDK constraints to
>=2.12.0-0 <3.0.0based on beta release guidelines.
- Update SDK constraints to
-
1.3.0-nullsafety.523 Oct 2020 pre-release -
1.3.0-nullsafety.409 Oct 2020 pre-releaseRelease notes
Open source →- Introduce
@internalto annotate elements that should not be used outside of the package in which the element is declared.
- Introduce
-
1.3.0-nullsafety.322 Sep 2020 pre-release -
1.3.0-nullsafety.222 Jul 2020 pre-release -
1.3.0-nullsafety.117 Jul 2020 pre-release -
1.3.0-nullsafety09 Jul 2020 pre-release -
1.2.418 Nov 2020Nothing published for this version
-
1.2.302 Sep 2020Nothing published for this version
-
1.2.209 Jul 2020Release notes
Open source →- Removed
unawaitedbecause the attempt to move it frompackage:pedanticcaused too many issues. If you see errors aboutunawaitedbeing declared in two places, please update the version constraints formetato1.2.2or later.
- Removed
-
1.2.106 Jul 2020Release notes
Open source →- Fixed a bug by adding an import of dart:async so that the code really is compatible with the lower bound of the SDK constraints.
-
1.2.006 Jul 2020Release notes
Open source →- Introduce
unawaitedto mark invocations that return aFuturewhere it's intentional that the future is not being awaited. (Moved frompackage:pedantic.) - Introduce
@doNotStoreto annotate methods, getters and functions to indicate that values obtained by invoking them should not be stored in a field or top-level variable.
- Introduce
-
1.1.830 Oct 2019Release notes
Open source →- Introduce
@nonVirtualto annotate instance members that should not be overridden in subclasses or when mixed in.
- Introduce
-
1.1.703 Jan 2019Release notes
Open source →-
Introduce
@sealedto declare that a class or mixin is not allowed as a super-type.Only classes in the same package as a class or mixin annotated with
@sealedmay extend, implement or mix-in the annotated class or mixin. (SDK issue 27372).
-
-
1.1.618 Jul 2018 -
1.1.503 May 2018Release notes
Open source →- Introduce @isTest and @isTestGroup to declare a function that is a test, or a test group.
-
1.1.228 Sep 2017 -
1.1.119 Jul 2017 -
1.1.010 Jul 2017Release notes
Open source →-
Introduce
@alwaysThrowsto declare that a function always throws (SDK issue 17999). This is first available in Dart SDK 1.25.0-dev.1.0.import 'package:meta/meta.dart'; // Without knowing that [failBigTime] always throws, it looks like this // function might return without returning a bool. bool fn(expected, actual) { if (expected != actual) failBigTime(expected, actual); else return True; } @alwaysThrows void failBigTime(expected, actual) { throw new StateError('Expected $expected, but was $actual.'); }
-
-
1.0.531 Mar 2017Release notes
Open source →- Introduce
@experimentalto annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change.
- Introduce
-
1.0.420 Sep 2016Release notes
Open source →-
Introduce
@virtualto allow field overrides in strong mode (SDK issue 27384).import 'package:meta/meta.dart' show virtual; class Base { @virtual int x; } class Derived extends Base { int x; // Expose the hidden storage slot: int get superX => super.x; set superX(int v) { super.x = v; } }
-
-
1.0.314 Sep 2016Release notes
Open source →-
Introduce
@checkedto override a method and tighten a parameter type (SDK issue 25578).import 'package:meta/meta.dart' show checked; class View { addChild(View v) {} } class MyView extends View { // this override is legal, it will check at runtime if we actually // got a MyView. addChild(@checked MyView v) {} } main() { dynamic mv = new MyView(); mv.addChild(new View()); // runtime error }
-
-
1.0.215 Aug 2016Release notes
Open source →- Introduce
@visibleForTestingannotation for declarations that may be referenced only in the library or in a test.
- Introduce
-
1.0.127 Jun 2016 -
0.12.118 Apr 2016 -
0.12.012 Apr 2016Release notes
Open source →- Introduce
@optionalTypeArgsannotation for classes whose type arguments are to be treated as optional.
- Introduce
-
0.11.006 Apr 2016Release notes
Open source →- Added new
Requiredconstructor with a means to specify a reason to explain why a parameter is required.
- Added new
-
0.10.003 Mar 2016Release notes
Open source →- Introduce
@factoryannotation for methods that must either be abstract or must return a newly allocated object. - Introduce
@literalannotation that indicates that any invocation of a constructor must use the keywordconstunless one or more of the arguments to the constructor is not a compile-time constant.
- Introduce
-
0.9.026 Feb 2016Release notes
Open source →- Introduce
@protectedannotation for members that must only be called from instance members of subclasses. - Introduce
@requiredannotation for optional parameters that should be treated as required. - Introduce
@mustCallSuperannotation for methods that must be invoked by all overriding methods.
- Introduce
-
0.8.830 Oct 2013Nothing published for this version
-
0.8.728 Oct 2013Nothing published for this version
-
0.8.624 Oct 2013Nothing published for this version
-
0.8.521 Oct 2013Nothing published for this version
-
0.8.419 Oct 2013Nothing published for this version
-
0.8.317 Oct 2013Nothing published for this version
-
0.8.214 Oct 2013Nothing published for this version
-
0.8.104 Oct 2013Nothing published for this version
-
0.8.003 Oct 2013Nothing published for this version
-
0.7.627 Sep 2013Nothing published for this version
-
0.7.6+401 Oct 2013Nothing published for this version