BuilderEntryImpl.forSharedPart constructor
BuilderEntryImpl.forSharedPart(
Creates a BuilderEntryImpl with a shared part builder.
key
A unique identifier for this builder.
generator
A factory function that creates the generator.
generateToCache
Whether outputs should be written to the build cache.
generateFor
Glob patterns that determine which files to process.
runsBefore
Builder keys that this builder should run before.
options
Configuration options for the builder.
registeredTypes
Runtime type register map for the builder.
allowSyntaxErrors
Whether to generate code even if the source file has syntax errors.
applies
Builder keys that this builder applies to.
Implementation
factory BuilderEntryImpl.forSharedPart(
String key,
GeneratorFactory generator, {
bool generateToCache = false,
Set<String> generateFor = const <String>{},
Set<String> runsBefore = const <String>{},
Map<String, dynamic> options = const <String, dynamic>{},
Map<Type, String> registeredTypes = const <Type, String>{},
bool allowSyntaxErrors = false,
Set<String> applies = const <String>{},
}) {
return BuilderEntryImpl(
key,
(BuilderOptions ops) => SharedPartBuilder(
<Generator>[generator(ops)],
allowSyntaxErrors: allowSyntaxErrors,
options: ops,
),
generateToCache: generateToCache,
generateFor: generateFor,
runsBefore: <String>{...runsBefore, ...applies},
options: options,
registeredTypes: registeredTypes,
applies: applies,
);
}