OLD | NEW |
| 1 ## 1.0.3 |
| 2 * Introduce `@checked` to override a method and tighten a parameter |
| 3 type (SDK issue [25578](https://github.com/dart-lang/sdk/issues/25578)). |
| 4 |
| 5 ```dart |
| 6 import 'package:meta/meta.dart' show checked; |
| 7 class View { |
| 8 addChild(View v) {} |
| 9 } |
| 10 class MyView extends View { |
| 11 // this override is legal, it will check at runtime if we actually |
| 12 // got a MyView. |
| 13 addChild(@checked MyView v) {} |
| 14 } |
| 15 main() { |
| 16 dynamic mv = new MyView(); |
| 17 mv.addChild(new View()); // runtime error |
| 18 } |
| 19 ``` |
| 20 |
1 ## 1.0.2 | 21 ## 1.0.2 |
2 * Introduce `@visibleForTesting` annotation for declarations that may be referen
ced only in the library or in a test. | 22 * Introduce `@visibleForTesting` annotation for declarations that may be referen
ced only in the library or in a test. |
3 | 23 |
4 ## 1.0.1 | 24 ## 1.0.1 |
5 * Updated `@factory` to allow statics and methods returning `null`. | 25 * Updated `@factory` to allow statics and methods returning `null`. |
6 | 26 |
7 ## 1.0.0 | 27 ## 1.0.0 |
8 * First stable API release. | 28 * First stable API release. |
9 | 29 |
10 ## 0.12.2 | 30 ## 0.12.2 |
(...skipping 15 matching lines...) Expand all Loading... |
26 constructor must use the keyword `const` unless one or more of the | 46 constructor must use the keyword `const` unless one or more of the |
27 arguments to the constructor is not a compile-time constant. | 47 arguments to the constructor is not a compile-time constant. |
28 | 48 |
29 ## 0.9.0 | 49 ## 0.9.0 |
30 * Introduce `@protected` annotation for members that must only be called from | 50 * Introduce `@protected` annotation for members that must only be called from |
31 instance members of subclasses. | 51 instance members of subclasses. |
32 * Introduce `@required` annotation for optional parameters that should be treate
d | 52 * Introduce `@required` annotation for optional parameters that should be treate
d |
33 as required. | 53 as required. |
34 * Introduce `@mustCallSuper` annotation for methods that must be invoked by all | 54 * Introduce `@mustCallSuper` annotation for methods that must be invoked by all |
35 overriding methods. | 55 overriding methods. |
OLD | NEW |