For example, I would just like to write:
class Dog {
final String name;
Dog(this.name);
bark() => 'Woof woof said $name';
}
But the definition of the type is #Dog.barkbe () => String.
This was not possible in Dart 1.x, but I hope that type inference can save the day and avoid the need to introduce trivial functions where the return type is output (same as for closing today?).
source
share