dart Metadata-元数据

其生

关注

阅读 29

2022-12-08

相当于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');
}

 



相关推荐

精彩评论(0)

0 0 举报