SystemPropertiesBuilder class
Builder for creating _SystemProperties
instances using a fluent API.
This allows you to configure runtime properties step by step before finalizing the snapshot with build.
Example:
final properties = _SystemProperties.builder()
.compilationMode(CompilationMode.release)
.runningFromDill(true)
.entrypoint('build/main.dill')
.build();
print(properties.getCompilationMode()); // CompilationMode.release
- Implemented types
Constructors
- SystemPropertiesBuilder()
-
Builder for creating
_SystemProperties
instances using a fluent API.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → _SystemProperties -
Finalizes and creates a new immutable
_SystemProperties
snapshot. -
compilationMode(
CompilationMode mode) → SystemPropertiesBuilder - Sets the compilation mode.
-
configurationCount(
int count) → SystemPropertiesBuilder - Sets the configuration count.
-
dependencyCount(
int count) → SystemPropertiesBuilder - Sets the dependency count.
-
entrypoint(
String path) → SystemPropertiesBuilder - Sets the application entrypoint path.
-
getCompilationMode(
) → CompilationMode -
Returns the current Dart VM
CompilationMode
.inherited -
getConfigurationCount(
) → int -
Returns the number of discovered configuration classes.
inherited
-
getDependencyCount(
) → int -
Returns the number of resolved dependencies in the application context.
inherited
-
getEntrypoint(
) → String -
Returns the application entry point file path.
inherited
-
getLaunchCommand(
) → String -
Returns the full command used to launch the application.
inherited
-
ideRunning(
bool value) → SystemPropertiesBuilder - Sets whether the app is running inside an IDE.
-
isDevelopmentMode(
) → bool -
Returns
true
if the application is running in development mode.inherited -
isIdeRunning(
) → bool -
Returns
true
if the application was launched from an IDE environment.inherited -
isProductionMode(
) → bool -
Returns
true
if the application is running in production mode.inherited -
isRunningAot(
) → bool -
Returns
true
if the application is running with AOT (Ahead-of-Time) compilation.inherited -
isRunningFromDill(
) → bool -
Returns
true
if the application is running from a precompiled.dill
file.inherited -
isRunningJit(
) → bool -
Returns
true
if the application is running with JIT (Just-in-Time) compilation.inherited -
isWatchModeEnabled(
) → bool -
Returns
true
if the application is running in watch / hot-reload mode.inherited -
launchCommand(
String command) → SystemPropertiesBuilder - Sets the launch command used to start the application.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runningAot(
bool value) → SystemPropertiesBuilder - Sets whether the app is running in AOT mode.
-
runningFromDill(
bool value) → SystemPropertiesBuilder -
Sets whether the app is running from a
.dill
file. -
runningJit(
bool value) → SystemPropertiesBuilder - Sets whether the app is running in JIT mode.
-
toJson(
) → Map< String, Object> -
Serializes this object into a JSON-compatible Map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
watchModeEnabled(
bool value) → SystemPropertiesBuilder - Sets whether watch mode is enabled.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited