Issue
Let's assume we have a 3rd party package:some_package that depends on dart_mappable to generate model classes. That package then exports models, but hides mappers to avoid polluting the autocomplete (see: #91).
Now, let's move to our app. We create a class that uses those exported models in our own dart_mappable class. The current implementation fails during code generation, because the 3rd party library doesn't export *Mapper and *CopyWith classes, but expects them since those models are annotated with @MappableClass().
Related repository
n-bernat/dart_mappable-issue278
Possible solution
Since we can add custom mappers to @MappableClass() (e.g. @MappableClass(includeCustomMappers: [_SomeMapper()]), it seems feasible to use provided custom mappers (if we have them), instead of generating new ones.
Issue
Let's assume we have a 3rd party
package:some_packagethat depends ondart_mappableto generate model classes. That package then exports models, but hides mappers to avoid polluting the autocomplete (see: #91).Now, let's move to our app. We create a class that uses those exported models in our own
dart_mappableclass. The current implementation fails during code generation, because the 3rd party library doesn't export*Mapperand*CopyWithclasses, but expects them since those models are annotated with@MappableClass().Related repository
n-bernat/dart_mappable-issue278Possible solution
Since we can add custom mappers to
@MappableClass()(e.g.@MappableClass(includeCustomMappers: [_SomeMapper()]), it seems feasible to use provided custom mappers (if we have them), instead of generating new ones.