📅  最后修改于: 2022-03-11 14:48:09.235000             🧑  作者: Mango
class Foo {
Foo getAnother(Foo foo) {
switch (foo.runtimeType) {
case Bar:
return new Bar();
case Baz:
return new Baz();
}
return null;
}
}