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.

Implemented types

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? targetIOSVersion, int? targetMacOSVersion, int? targetAndroidNdkApi, CCompilerConfig? cCompiler, required LinkModePreference linkModePreference, @Deprecated(metadataDeprecation) Map<String, Map<String, Object>>? dependencyMetadata, Iterable<String>? supportedAssetTypes, required bool linkingEnabled})
Constructs a config for a non-dry run by providing values for each field.
factory
BuildConfig.dryRun({required Uri outputDirectory, required String packageName, required Uri packageRoot, required OS targetOS, required LinkModePreference linkModePreference, required bool linkingEnabled, 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 setterinherited
cCompiler CCompilerConfig
The configuration for invoking the C compiler.
no setterinherited
dryRun bool
Whether this run is a dry-run, which doesn't build anything.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
linkingEnabled bool
Whether link hooks will be run after the build hooks.
no setter
linkModePreference LinkModePreference
The preferred LinkMode method for NativeCodeAssets.
no setterinherited
outputDirectory Uri
The directory in which all output and intermediate artifacts should be placed.
no setterinherited
packageName String
The name of the package the assets are built for.
no setterinherited
packageRoot Uri
The root of the package the assets are built for.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedAssetTypes Iterable<String>
The asset types that the invoker of this hook supports.
no setterinherited
targetAndroidNdkApi int?
When compiling for Android, the minimum Android SDK API version to that the compiled code will be compatible with.
no setterinherited
targetArchitecture Architecture?
The architecture being compiled for.
no setterinherited
targetIOSSdk IOSSdk?
When compiling for iOS, whether to target device or simulator.
no setterinherited
targetIOSVersion int?
When compiling for iOS, the lowest iOS version that the compiled code will be compatible with.
no setterinherited
targetMacOSVersion int?
When compiling for MacOS, the lowest MacOS version that the compiled code will be compatible with.
no setterinherited
targetOS OS
The operating system being compiled for.
no setterinherited

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