相当于java里的注解,C#里的特性,
Metadate
library todo;
class Todo {
final String who;
final String what;
const Todo(this.who, this.what);
}
@Todo('seth', 'make this do something')
void doSomething() {
print('do something');
}
相当于java里的注解,C#里的特性,
Metadate
library todo;
class Todo {
final String who;
final String what;
const Todo(this.who, this.what);
}
@Todo('seth', 'make this do something')
void doSomething() {
print('do something');
}