BuildContext class
Context parameters configured for an execution of the Flutter build subsystem.
Constructors
-
BuildContext({required String projectPath, required BuildPlatform platform, required BuildFormat format, String? versionName, int? buildNumber, bool dryRun = false, bool isReleaseMode = true, String? flavor, String? target, List<
String> extraArgs = const []}) -
Creates a BuildContext instance.
const
Properties
- buildNumber → int?
-
Numeric build version counter override (e.g.,
42).final - dryRun → bool
-
Whether the compilation should be simulated without invoking the compiler.
final
-
extraArgs
→ List<
String> -
Additional command-line arguments to pass directly to the Flutter compiler.
final
- flavor → String?
-
Specific build flavor name to pass to Flutter compiler.
final
- format → BuildFormat
-
Artifact format to compile (
appbundle,apk, oripa).final - hashCode → int
-
The hash code for this object.
no setterinherited
- isReleaseMode → bool
-
Whether compilation is targeted for release mode (
true) or debug mode (false).final - platform → BuildPlatform
-
Target platform for compilation (
android,ios, orall).final - projectPath → String
-
Path to the root of the target Flutter project directory.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- target → String?
-
Entrypoint Dart file path override (e.g.,
'lib/main.dart').final - versionName → String?
-
Semantic version name override (e.g.,
'1.2.3').final
Methods
-
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