meta 1.0.3
meta: ^1.0.3 copied to clipboard
This library contains the definitions of annotations that provide additional semantic information about the program being annotated. These annotations are intended to be used by tools to provide a bet [...]
1.0.3 #
-
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.2 #
- Introduce
@visibleForTestingannotation for declarations that may be referenced only in the library or in a test.
1.0.1 #
- Updated
@factoryto allow statics and methods returningnull.
1.0.0 #
- First stable API release.
0.12.2 #
- Updated
@protectedto include implemented interfaces (linter#252).
0.12.1 #
- Fixed markdown in dartdocs.
0.12.0 #
- Introduce
@optionalTypeArgsannotation for classes whose type arguments are to be treated as optional.
0.11.0 #
- Added new
Requiredconstructor with a means to specify a reason to explain why a parameter is required.
0.10.0 #
- 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.
0.9.0 #
- 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.