| Index: samples/meta/meta_sample.dart
|
| ===================================================================
|
| --- samples/meta/meta_sample.dart (revision 0)
|
| +++ samples/meta/meta_sample.dart (revision 0)
|
| @@ -0,0 +1,33 @@
|
| +
|
| +#import("package:meta/meta.dart");
|
| +
|
| +
|
| +// The Editor will display calls to imDeprecated() in strikeout.
|
| +@deprecated
|
| +void imDeprecated() {
|
| + print("I'm deprecated!");
|
| +}
|
| +
|
| +
|
| +abstract class Animal {
|
| + int legCount();
|
| +}
|
| +
|
| +
|
| +class Dog extends Animal {
|
| + @override
|
| + int legCount() => 4;
|
| +
|
| + // The Editor will warn about this, as no parent method is overridden.
|
| + @override
|
| + void bark() => print("bark!");
|
| +}
|
| +
|
| +
|
| +void main() {
|
| + imDeprecated();
|
| +
|
| + Dog dog = new Dog();
|
| +
|
| + dog.bark();
|
| +}
|
|
|