Skip to content

Field mapping does not work with Constructor parameters properly #238

Description

@petrnymsa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue has to be triaged first

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions