ModelDictionaryBuilder<_ClassAnnotation> class

Writes ModelDictionary code to connect model and adapters. Outputs to brick/brick.g.dart

Inheritance

Constructors

ModelDictionaryBuilder(ModelDictionaryGenerator modelDictionaryGenerator, {List<String> expectedImportRemovals = const <String>[]})

Properties

buildExtensions Map<String, List<String>>
Mapping from input file extension to output file extensions.
no setterinherited
expectedImportRemovals List<String>
Import files to clean up from the final brick.g.dart file. For example, all annotations should be expanded into generated code, so their imports are no longer required by Brick.
final
hashCode int
The hash code for this object.
no setterinherited
logger → Logger
no setterinherited
modelDictionaryGenerator ModelDictionaryGenerator
final
outputExtension String
The cached file this will produce
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeChecker → TypeChecker
finalinherited

Methods

build(BuildStep buildStep) Future<void>
Generates the outputs for a given BuildStep.
getAnnotatedElements(BuildStep buildStep) Future<Iterable<AnnotatedElement>>
Classes with the class-level annotation. For example, ConnectOfflineFirstWithRest.
inherited
logStopwatch(String task, Stopwatch stopwatch) → void
After a task has completed, log time to completion.
inherited
manuallyUpsertBrickFile(String path, String contents) Future<File>
Create or write to file.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replaceWithinFile(String path, Pattern from, String to) Future<File?>
Replace contents of file
inherited
stopwatchToSeconds(Stopwatch stopwatch) String
Stop stopwatch and conditionally format elapsed time as seconds or ms
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

modelFiles → Glob
final

Static Methods

classFilePathsFromAnnotations(Iterable<AnnotatedElement> annotations, Map<String, String> filesToContents) Map<String, String>