My question is very simple, I hope, I have a class and then I wish to create a private property that is the sum of 2 others... how can I achieve it?
class Test {
Test({this.a, this.b});
final int a;
final int b;
int _c = a + b; // errors
}
Errors:
The instance member 'a' can't be accessed in an initializer.
The instance member 'b' can't be accessed in an initializer.