mockBuilder function
Builder
mockBuilder(
- BuilderOptions options
Returns the Builder registered in build.yaml. Emits a standalone
.mock.dart library next to every input library that contains at least one
class annotated with @Mockable().
A standalone library (rather than a part of file) is required so the
output can import the libraries that declare deeply-nested model types,
which lets a single annotation on the top class generate the entire nested
tree across files.
Implementation
Builder mockBuilder(BuilderOptions options) => LibraryBuilder(
const MockLibraryGenerator(),
generatedExtension: '.mock.dart',
header: _header,
writeDescriptions: false,
);