OLD | NEW |
| 1 ## 1.0.4 |
| 2 * Introduce `@virtual` to allow field overrides in strong mode |
| 3 (SDK issue [27384](https://github.com/dart-lang/sdk/issues/27384)). |
| 4 |
| 5 ```dart |
| 6 import 'package:meta/meta.dart' show virtual; |
| 7 class Base { |
| 8 @virtual int x; |
| 9 } |
| 10 class Derived extends Base { |
| 11 int x; |
| 12 |
| 13 // Expose the hidden storage slot: |
| 14 int get superX => super.x; |
| 15 set superX(int v) { super.x = v; } |
| 16 } |
| 17 ``` |
| 18 |
1 ## 1.0.3 | 19 ## 1.0.3 |
2 * Introduce `@checked` to override a method and tighten a parameter | 20 * Introduce `@checked` to override a method and tighten a parameter |
3 type (SDK issue [25578](https://github.com/dart-lang/sdk/issues/25578)). | 21 type (SDK issue [25578](https://github.com/dart-lang/sdk/issues/25578)). |
4 | 22 |
5 ```dart | 23 ```dart |
6 import 'package:meta/meta.dart' show checked; | 24 import 'package:meta/meta.dart' show checked; |
7 class View { | 25 class View { |
8 addChild(View v) {} | 26 addChild(View v) {} |
9 } | 27 } |
10 class MyView extends View { | 28 class MyView extends View { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 constructor must use the keyword `const` unless one or more of the | 64 constructor must use the keyword `const` unless one or more of the |
47 arguments to the constructor is not a compile-time constant. | 65 arguments to the constructor is not a compile-time constant. |
48 | 66 |
49 ## 0.9.0 | 67 ## 0.9.0 |
50 * Introduce `@protected` annotation for members that must only be called from | 68 * Introduce `@protected` annotation for members that must only be called from |
51 instance members of subclasses. | 69 instance members of subclasses. |
52 * Introduce `@required` annotation for optional parameters that should be treate
d | 70 * Introduce `@required` annotation for optional parameters that should be treate
d |
53 as required. | 71 as required. |
54 * Introduce `@mustCallSuper` annotation for methods that must be invoked by all | 72 * Introduce `@mustCallSuper` annotation for methods that must be invoked by all |
55 overriding methods. | 73 overriding methods. |
OLD | NEW |