In JavaScript there is a difference between m1 and m2:
class A { m1() { return 123; } m2 = () => 123; } Here, m1 is stored in the prototype (it exists in the object that represents the class) while a copy of m2 is stored in each instance as a property. So the first syntax is better where it is adapted.
I would like to know if there is a similar difference in Dart for this kind of code:
class A { int m1() { return 123; } int m2() => 123; } At runtime, are m1 and m2 completely equivalent?