FormulaContext class
Ambient context handed to a Formula action: the host platform, an optional pinned target version, free-form parameters, a clock and a log sink for streaming progress.
Constructors
-
FormulaContext({required PlatformInfo platform, String? targetVersion, Map<
String, String> parameters = const {}, Clock clock = const SystemClock(), void log(String line)?}) - Creates a formula context.
Properties
- clock → Clock
-
Time source (injectable for tests).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- log → void Function(String line)
-
Sink for streaming log lines as the action runs.
final
-
parameters
→ Map<
String, String> -
Free-form parameters supplied by the preset / caller.
final
- platform → PlatformInfo
-
Static facts about the host the formula runs on.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- targetVersion → String?
-
The target version to converge to, if pinned.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
now(
) → DateTime - The current instant (UTC), via clock.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited