Reputation: 3767
I have a class X with attributes
int a;
int b;
int c;
And I have class Y with attributes
int a;
int b;
int c;
int d;
How do we assign class Y to class X without assigning one by one? I hope there is less troublesome method like x.add(y) but excluding certain attributes. Is this possible?
Upvotes: 3
Views: 2686
Reputation: 657676
You have to assign one-by one.
Destructuring might help and is being discussed https://github.com/dart-lang/language/issues/207
Upvotes: 4