2023-03-22 20:58:58 +00:00
|
|
|
## 1.9.1
|
2023-03-07 21:21:01 +00:00
|
|
|
|
2023-03-22 20:58:58 +00:00
|
|
|
* Update SDK constraints to `>=2.12.0 <4.0.0`.
|
|
|
|
* Mark `@reopen` stable.
|
2023-03-07 21:21:01 +00:00
|
|
|
|
2022-07-25 22:17:18 +00:00
|
|
|
## 1.9.0
|
|
|
|
|
2023-01-23 21:33:53 +00:00
|
|
|
* Introduce `@reopen` to annotate class or mixin declarations that can safely
|
|
|
|
extend classes marked `base`, `final` or `interface`.
|
2022-07-25 22:17:18 +00:00
|
|
|
* Introduce `@MustBeOverridden` to annotate class or mixin members which must be
|
|
|
|
overridden in all subclasses.
|
2023-01-26 16:42:08 +00:00
|
|
|
* Deprecate `@alwaysThrows`, which can be replaced by using a return type of
|
|
|
|
'Never'.
|
2022-07-25 22:17:18 +00:00
|
|
|
|
2022-05-16 21:56:05 +00:00
|
|
|
## 1.8.0
|
2021-08-04 16:03:59 +00:00
|
|
|
|
|
|
|
* Add `@UseResult.unless`.
|
2021-08-16 18:02:39 +00:00
|
|
|
* The mechanism behind `noInline` and `tryInline` from `dart2js.dart` has been
|
|
|
|
changed. This should not affect the use of these annotations in practice.
|
2021-08-04 16:03:59 +00:00
|
|
|
|
2021-07-07 21:02:53 +00:00
|
|
|
## 1.7.0
|
|
|
|
|
|
|
|
* Restore `TargetKindExtension` and `get displayString`.
|
|
|
|
We published `analyzer 1.7.2` that is compatible with `TargetKindExtension`.
|
|
|
|
|
|
|
|
## 2.0.0 - removed
|
2021-07-03 01:22:45 +00:00
|
|
|
|
|
|
|
* Restore `TargetKindExtension` and `get displayString`.
|
|
|
|
|
2021-07-03 00:00:05 +00:00
|
|
|
## 1.6.0
|
|
|
|
|
|
|
|
* Remove `TargetKindExtension`. Adding it was a breaking change, because there
|
|
|
|
are clients, e.g. `analyze 1.7.0`, that also declare an extension on
|
|
|
|
`TargetKind`, and also declare `get displayString`. This causes a conflict.
|
|
|
|
|
2021-07-02 21:49:18 +00:00
|
|
|
## 1.5.0
|
|
|
|
|
|
|
|
* Add `TargetKindExtension.displayString`.
|
|
|
|
|
2021-05-25 23:35:01 +00:00
|
|
|
## 1.4.0
|
|
|
|
|
|
|
|
* Introduce `TargetKind.topLevelVariable` that indicates that an annotation
|
|
|
|
is valid on any top-level variable declaration.
|
|
|
|
* Introduce `@useResult` to annotate methods, fields, or getters that
|
|
|
|
return values that should be used - stored, passed as arguments, etc.
|
|
|
|
* Updates for documentation.
|
|
|
|
|
2021-02-02 21:33:17 +00:00
|
|
|
## 1.3.0
|
|
|
|
|
|
|
|
* Stable release for null safety.
|
|
|
|
|
2020-11-03 20:45:37 +00:00
|
|
|
## 1.3.0-nullsafety.6
|
|
|
|
|
|
|
|
* Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release
|
|
|
|
guidelines.
|
|
|
|
|
2020-10-23 17:49:24 +00:00
|
|
|
## 1.3.0-nullsafety.5
|
|
|
|
|
|
|
|
* Allow prerelease versions of the `2.12` sdk.
|
|
|
|
|
2020-09-24 00:25:29 +00:00
|
|
|
## 1.3.0-nullsafety.4
|
|
|
|
|
|
|
|
* Introduce `@internal` to annotate elements that should not be used outside of
|
|
|
|
the package in which the element is declared.
|
|
|
|
|
2020-09-22 00:16:02 +00:00
|
|
|
## 1.3.0-nullsafety.3
|
|
|
|
|
|
|
|
* Allow 2.10 stable and 2.11.0 dev SDK versions.
|
|
|
|
|
2020-07-22 15:28:34 +00:00
|
|
|
## 1.3.0-nullsafety.2
|
|
|
|
|
|
|
|
* Update for the 2.10 dev sdk.
|
|
|
|
|
2020-07-17 16:29:40 +00:00
|
|
|
## 1.3.0-nullsafety.1
|
|
|
|
|
|
|
|
* Allow the <=2.9.10 stable sdk.
|
|
|
|
|
2020-07-09 16:39:12 +00:00
|
|
|
## 1.3.0-nullsafety
|
2020-06-22 18:51:56 +00:00
|
|
|
|
|
|
|
* Opt into null safety.
|
2020-07-09 17:38:32 +00:00
|
|
|
|
|
|
|
## 1.2.2
|
|
|
|
|
|
|
|
* Removed `unawaited` because the attempt to move it from `package:pedantic`
|
|
|
|
caused too many issues. If you see errors about `unawaited` being declared in
|
|
|
|
two places, please update the version constraints for `meta` to `1.2.2` or
|
|
|
|
later.
|
|
|
|
|
|
|
|
## 1.2.1
|
|
|
|
|
|
|
|
* 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.0
|
|
|
|
|
|
|
|
* Introduce `unawaited` to mark invocations that return a `Future` where it's
|
|
|
|
intentional that the future is not being awaited. (Moved from
|
|
|
|
`package:pedantic`.)
|
2020-06-25 20:12:32 +00:00
|
|
|
* Introduce `@doNotStore` to annotate methods, getters and functions to
|
|
|
|
indicate that values obtained by invoking them should not be stored in a
|
|
|
|
field or top-level variable.
|
2020-06-22 18:51:56 +00:00
|
|
|
|
2019-10-30 14:11:14 +00:00
|
|
|
## 1.1.8
|
|
|
|
|
|
|
|
* Introduce `@nonVirtual` to annotate instance members that should not be
|
|
|
|
overridden in subclasses or when mixed in.
|
|
|
|
|
2018-08-22 04:03:22 +00:00
|
|
|
## 1.1.7
|
|
|
|
|
2018-08-22 15:22:58 +00:00
|
|
|
* Introduce `@sealed` to 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 `@sealed`
|
|
|
|
may extend, implement or mix-in the annotated class or mixin. (SDK issue
|
2018-08-22 04:03:22 +00:00
|
|
|
[27372](https://github.com/dart-lang/sdk/issues/27372)).
|
|
|
|
|
2018-07-18 22:13:43 +00:00
|
|
|
## 1.1.6
|
2018-05-03 20:00:44 +00:00
|
|
|
|
2018-07-16 13:32:20 +00:00
|
|
|
* Set max SDK version to <3.0.0.
|
|
|
|
|
2018-07-18 22:13:43 +00:00
|
|
|
## 1.1.5
|
|
|
|
|
2018-05-03 20:00:44 +00:00
|
|
|
* Introduce @isTest and @isTestGroup to declare a function that is a
|
|
|
|
test, or a test group.
|
|
|
|
|
2017-10-27 21:21:13 +00:00
|
|
|
## 1.1.4
|
|
|
|
|
2017-11-03 19:04:20 +00:00
|
|
|
* Added dart2js.dart.
|
2017-10-27 21:21:13 +00:00
|
|
|
|
2017-09-28 19:33:27 +00:00
|
|
|
## 1.1.2
|
|
|
|
|
|
|
|
* Rollback SDK constraint update for 2.0.0. No longer needed.
|
|
|
|
|
2017-07-19 21:30:39 +00:00
|
|
|
## 1.1.1
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2017-07-19 21:30:39 +00:00
|
|
|
* Update SDK constraint to be 2.0.0 dev friendly.
|
|
|
|
|
2017-07-10 21:58:11 +00:00
|
|
|
## 1.1.0
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2017-07-10 21:58:11 +00:00
|
|
|
* Introduce `@alwaysThrows` to declare that a function always throws
|
|
|
|
(SDK issue [17999](https://github.com/dart-lang/sdk/issues/17999)). This
|
|
|
|
is first available in Dart SDK 1.25.0-dev.1.0.
|
|
|
|
|
|
|
|
```dart
|
|
|
|
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.');
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-12-15 23:40:03 +00:00
|
|
|
## 1.0.5
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2017-12-15 23:40:03 +00:00
|
|
|
* Introduce `@experimental` to 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.
|
|
|
|
|
2016-09-19 16:45:24 +00:00
|
|
|
## 1.0.4
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-09-19 16:45:24 +00:00
|
|
|
* Introduce `@virtual` to allow field overrides in strong mode
|
|
|
|
(SDK issue [27384](https://github.com/dart-lang/sdk/issues/27384)).
|
|
|
|
|
|
|
|
```dart
|
|
|
|
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; }
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2016-09-14 00:26:24 +00:00
|
|
|
## 1.0.3
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-09-14 00:26:24 +00:00
|
|
|
* Introduce `@checked` to override a method and tighten a parameter
|
|
|
|
type (SDK issue [25578](https://github.com/dart-lang/sdk/issues/25578)).
|
|
|
|
|
|
|
|
```dart
|
|
|
|
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
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2016-08-15 18:58:59 +00:00
|
|
|
## 1.0.2
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-08-15 18:58:59 +00:00
|
|
|
* Introduce `@visibleForTesting` annotation for declarations that may be referenced only in the library or in a test.
|
|
|
|
|
2016-06-21 22:33:07 +00:00
|
|
|
## 1.0.1
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-06-21 22:33:07 +00:00
|
|
|
* Updated `@factory` to allow statics and methods returning `null`.
|
|
|
|
|
2016-06-13 22:48:13 +00:00
|
|
|
## 1.0.0
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-06-13 22:48:13 +00:00
|
|
|
* First stable API release.
|
|
|
|
|
2016-06-02 23:13:03 +00:00
|
|
|
## 0.12.2
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-06-02 23:13:03 +00:00
|
|
|
* Updated `@protected` to include implemented interfaces (linter#252).
|
|
|
|
|
2016-04-18 21:29:45 +00:00
|
|
|
## 0.12.1
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-04-18 21:29:45 +00:00
|
|
|
* Fixed markdown in dartdocs.
|
|
|
|
|
2016-04-12 00:07:14 +00:00
|
|
|
## 0.12.0
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-04-12 00:07:14 +00:00
|
|
|
* Introduce `@optionalTypeArgs` annotation for classes whose type arguments are to be treated as optional.
|
|
|
|
|
2016-04-06 21:58:25 +00:00
|
|
|
## 0.11.0
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-04-06 21:58:25 +00:00
|
|
|
* Added new `Required` constructor with a means to specify a reason to explain why a parameter is required.
|
|
|
|
|
2016-03-03 18:53:08 +00:00
|
|
|
## 0.10.0
|
2018-05-03 20:52:40 +00:00
|
|
|
|
|
|
|
* Introduce `@factory` annotation for methods that must either be abstract or must return a newly allocated object.
|
2016-03-03 18:53:08 +00:00
|
|
|
* Introduce `@literal` annotation that indicates that any invocation of a
|
|
|
|
constructor must use the keyword `const` unless one or more of the
|
|
|
|
arguments to the constructor is not a compile-time constant.
|
|
|
|
|
2016-02-22 21:38:29 +00:00
|
|
|
## 0.9.0
|
2018-05-03 20:52:40 +00:00
|
|
|
|
2016-02-25 22:33:34 +00:00
|
|
|
* Introduce `@protected` annotation for members that must only be called from
|
|
|
|
instance members of subclasses.
|
2016-02-25 22:16:06 +00:00
|
|
|
* Introduce `@required` annotation for optional parameters that should be treated
|
|
|
|
as required.
|
2016-02-25 22:33:34 +00:00
|
|
|
* Introduce `@mustCallSuper` annotation for methods that must be invoked by all
|
|
|
|
overriding methods.
|