BuildContext class Null safety

Configuration and context values used during Build.execute.

Constructors

BuildContext(Uri rootLibraryFileUri, Uri buildDirectoryUri, Uri executableUri, String source, {bool? forTests})
BuildContext.fromMap(Map<String, dynamic> map)
factory

Properties

analyzer CodeAnalyzer?
read / write
buildApplicationDirectory Directory
Directory for compiled application
read-only
buildDirectory Directory
The directory where build artifacts are stored.
read-only
buildDirectoryUri Uri
A Uri to directory where build artifacts are stored during the build process.
final
buildPackagesDirectory Directory
Directory for compiled packages
read-only
buildRuntimeDirectory Directory
The generated replica directory
read-only
context MirrorContext
The RuntimeContext available during the build process.
read-only
executableUri Uri
A Uri to the executable build product file.
final
forTests bool
Whether dev dependencies of the application package are included in the dependencies of the compiled executable.
final
hashCode int
The hash code for this object.
read-only, inherited
resolvedPackages Map<String, Uri>
Gets dependency package location relative to sourceApplicationDirectory.
read-only
rootLibraryFileUri Uri
A Uri to the library file of the application to be compiled.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
safeMap Map<String, dynamic>
read-only
source String
The source script for the executable.
final
sourceApplicationDirectory Directory
The directory of the application being compiled.
read-only
sourceApplicationPubspec Pubspec
read-only
sourceApplicationPubspecMap Map
read-only
sourceLibraryFile File
The library file of the application being compiled.
read-only
targetScriptFileUri Uri
read-only

Methods

getAnnotationsFromField(Type _type, String propertyName) List<Annotation>
getClassDeclarationFromType(Type type) ClassDeclaration?
getDirectory(Uri uri) Directory
Returns a Directory at uri, creates it recursively if it doesn't exist.
getFile(Uri uri) File
Returns a File at uri, creates all parent directories recursively if necessary.
getImportDirectives({Uri? uri, String? source, bool alsoImportOriginalFile = false}) List<String>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
resolveUri(Uri uri) Uri
toString() String
A string representation of this object.
inherited

Operators

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