@override用法(指明一个方法是覆盖了父类的方法)
void main() { Man(); } class Person { void speak() { print('hi'); } } class Man extends Person { @override void speak() { print('你好'); } }
void main() { Man(); } class Person { void speak() { print('hi'); } } class Man extends Person { @override void speak() { print('你好'); } }