Skip to content

Static mapping #53

@andrew-tpz

Description

@andrew-tpz

For now we have to create mapper instance:

    final mapper = SomeMapperImpl();
    final entities = models.map(mapper.fromModel);

It would be greate to use mappers as static

    final entities = models.map(SomeMapper.fromModel);

Something like this:

@Mapper()
abstract class EntityMapper {
  static Entity fromModel(Model model) => _$EntityMapperFromModel(model);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions