auto_mappr
auto_mappr copied to clipboard
Field mapping does not work with Constructor parameters properly
Describe the bug If I have custom constructor selected via "constructor" and this constructor has parameter named differently than backing field, mapping does not wrok
To Reproduce
class Source {
int a;
}
class Target {
int secret;
Target.foo({required a}) : this.secret = a;
}
Without explicit mapping
Field('a', from: 'a')
mapper will not generate proper mapping although it should
**Version info**
- Package version : 1.9.0
we should also concider targetConstructor vs sourceConstructor when reverse: true