Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the fill data straightly way #65

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

SkyeVaccu
Copy link

When I use this plugin , I can't fill the data straightly into the target object . I add the isStraight into @Mapping annotation and change the _targetToSource method . I just change the implement way , not to change the content. So it has created the all previous example successfully after my test.

It makes we can straightly fill the data into the target as the field , we don't need to package the parameter as the function or bean when we are in the easy situation. The example is the the dog_example folder.

… can fill the data to the target straightly and user don't package it into a bean
Copy link
Owner

@smotastic smotastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SkyeVaccu
I really like the feature here, and it is a good addition.
Sorry for the late review though, was really busy :(
Just some small things to think about

example/lib/dog_mapping/dog_mapping.dart Show resolved Hide resolved
Expression generateSourceFieldAssignment(SourceAssignment sourceAssignment,
ClassElement abstractMapper, VariableElement targetField) {
Expression generateSourceFieldAssignment(
SourceAssignment sourceAssignment, ClassElement abstractMapper, VariableElement targetField) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, as already mentioned in your E-Mail (sorry for the late reply :(), would be nice if we could keep the original formatting (for now).
I am not sure if it is possible to configure the formatter on project level, but maybe this would be a good idea to try, as this would avoid the clash of different formatters when collaborating.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am so sorry. I change the code formatting too much. If we can come to a consensus view about this idea. I will change the pr and keep the origin formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants