-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
Hi, this is a great package thanks for sharing. I did look at the documentation and did not see anything like...
For example, I have the class
class UserResponse { final String profile; ... }
And I have
enum UserProfile { investor, consumer }
class User {
final UserProfile profile;
...
}
How can I make the mapper to map with a custom logic for example:
profile: enumFromString<UserProfile>(
UserProfile.values,
response.profile,
UserProfile.consumer,
)
for the profile field. This is just one example there is several more like
class UserResponse {
final String zipCode;
final String number;
final String street;
...
}
Map to
class User {
final Address address;
}
smotastic
Metadata
Metadata
Assignees
Labels
No labels