Built-in Annotations: override, deprecated
Signal intent to tools and teammates.
What Annotations Are
An annotation is metadata you attach to code with an @ symbol. It does not run; it informs tools, the analyzer, and your teammates. 🏷️
The @ Syntax
You place an annotation on the line right before a declaration. The @ prefix tells Dart this token is metadata, not a normal expression.
@override
String toString() => 'Cat';All lessons in this course
- Built-in Annotations: override, deprecated
- Writing Custom Annotations
- Code Generation With build_runner
- json_serializable in Action