mapperBuilder function

Builder mapperBuilder(
  1. BuilderOptions options
)

Creates a builder for generating mapping code.

This function is called by build_runner to create a PartBuilder that generates .mapper.dart files containing the mapping methods for classes annotated with @Mapper.

The options parameter contains build configuration options passed from build.yaml or build_runner.

Returns a PartBuilder configured to use MapperGenerator and generate files with the .mapper.dart extension.

Implementation

Builder mapperBuilder(BuilderOptions options) =>
    PartBuilder([MapperGenerator()], '.mapper.dart');