OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /// Constants for use in metadata annotations. | 5 /// Constants for use in metadata annotations. |
6 /// | 6 /// |
7 /// See also `@deprecated` and `@override` in the `dart:core` library. | 7 /// See also `@deprecated` and `@override` in the `dart:core` library. |
8 /// | 8 /// |
9 /// Annotations provide semantic information that tools can use to provide a | 9 /// Annotations provide semantic information that tools can use to provide a |
10 /// better user experience. For example, an IDE might not autocomplete the name | 10 /// better user experience. For example, an IDE might not autocomplete the name |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 /// @Required('Buttons must do something when pressed') | 121 /// @Required('Buttons must do something when pressed') |
122 /// Function onPressed, | 122 /// Function onPressed, |
123 /// ... | 123 /// ... |
124 /// }) ... | 124 /// }) ... |
125 final String reason; | 125 final String reason; |
126 | 126 |
127 /// Initialize a newly created instance to have the given [reason]. | 127 /// Initialize a newly created instance to have the given [reason]. |
128 const Required([this.reason]); | 128 const Required([this.reason]); |
129 } | 129 } |
130 | 130 |
| 131 |
| 132 /// Used to annotate a parameter of an instance method that overrides another |
| 133 /// method. |
| 134 /// |
| 135 /// Indicates that this parameter may have a tighter type than the parameter on |
| 136 /// its superclass. The actual argument will be checked at runtime to ensure it |
| 137 /// is a subtype of the overridden parameter type. |
| 138 const _Checked checked = const _Checked(); |
| 139 |
| 140 class _Checked { |
| 141 const _Checked(); |
| 142 } |
| 143 |
131 class _Factory { | 144 class _Factory { |
132 const _Factory(); | 145 const _Factory(); |
133 } | 146 } |
134 | 147 |
135 class _Literal { | 148 class _Literal { |
136 const _Literal(); | 149 const _Literal(); |
137 } | 150 } |
138 | 151 |
139 class _MustCallSuper { | 152 class _MustCallSuper { |
140 const _MustCallSuper(); | 153 const _MustCallSuper(); |
141 } | 154 } |
142 | 155 |
143 class _OptionalTypeArgs { | 156 class _OptionalTypeArgs { |
144 const _OptionalTypeArgs(); | 157 const _OptionalTypeArgs(); |
145 } | 158 } |
146 | 159 |
147 class _Protected { | 160 class _Protected { |
148 const _Protected(); | 161 const _Protected(); |
149 } | 162 } |
150 | 163 |
151 class _VisibleForTesting { | 164 class _VisibleForTesting { |
152 const _VisibleForTesting(); | 165 const _VisibleForTesting(); |
153 } | 166 } |
OLD | NEW |