BuildConfig class abstract final

The configuration for a build hook (hook/build.dart) invocation.

A package can optionally provide build hook. If such a hook exists, it will be automatically run, by the Flutter and Dart SDK tools. The hook will be run with specific commandline arguments, which BuildConfig can parse and provide more convenient access to.

Constructors

BuildConfig(List<String> arguments, {Map<String, String>? environment, Uri? workingDirectory})
Constructs a config by parsing CLI arguments and loading the config file.
factory
BuildConfig.build({required Uri outputDirectory, required String packageName, required Uri packageRoot, required BuildMode buildMode, required Architecture targetArchitecture, required OS targetOS, IOSSdk? targetIOSSdk, int? targetAndroidNdkApi, CCompilerConfig? cCompiler, required LinkModePreference linkModePreference, Map<String, Map<String, Object>>? dependencyMetadata, Iterable<String>? supportedAssetTypes})
Constructs a config for a non-dry run by providing values for each field.
factory
BuildConfig.dryRun({required Uri outDir, required String packageName, required Uri packageRoot, required OS targetOS, required LinkModePreference linkModePreference, Iterable<String>? supportedAssetTypes})
Constructs a config for a dry run by providing values for each field.
factory

Properties

buildMode BuildMode
The BuildMode that the code should be compiled in.
no setter
cCompiler CCompilerConfig
The configuration for invoking the C compiler.
no setter
dryRun bool
Whether this run is a dry-run, which doesn't build anything.
no setter
hashCode int
The hash code for this object.
no setterinherited
linkModePreference LinkModePreference
The preferred LinkMode method for NativeCodeAssets.
no setter
outputDirectory Uri
The directory in which all output and intermediate artifacts should be placed.
no setter
packageName String
The name of the package the native assets are built for.
no setter
packageRoot Uri
The root of the package the native assets are built for.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedAssetTypes Iterable<String>
The asset types that the invoker of this build supports.
no setter
targetAndroidNdkApi int?
When compiling for Android, the minimum Android SDK API version to that the compiled code will be compatible with.
no setter
targetArchitecture Architecture?
The architecture being compiled for.
no setter
targetIOSSdk IOSSdk
When compiling for iOS, whether to target device or simulator.
no setter
targetOS OS
The operating system being compiled for.
no setter

Methods

metadatum(String packageName, String key) Object?
Metadata from a direct dependency.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

latestVersion → Version
The version of BuildConfig.
no setter