ExecutePlaceholderResolver class

Resolves placeholders in command strings for execute commands.

Uses %{...} syntax to avoid conflicts with both shell variable expansion (${...}) and YAML comments (# after whitespace).

Supports:

  • Path placeholders: %{root}, %{folder}, %{folder.name}, %{folder.relative}
  • Platform placeholders: %{current-os}, %{current-arch}, %{current-platform}
  • Nature existence: %{dart.exists}, %{flutter.exists}, etc.
  • Nature attributes: %{dart.name}, %{git.branch}, etc.
  • Convenience aliases: %{project-name}, %{project-version}
  • Ternary expressions: %{condition?(true-value):(false-value)}

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

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 Methods

checkCondition(String condition, ExecutePlaceholderContext ctx) bool
Check if a condition placeholder is satisfied.
getPlaceholderHelp() Map<String, String>
Get list of all available placeholders with descriptions.
isBooleanPlaceholder(String placeholder) bool
Check if a placeholder name is a known boolean placeholder.
resolveBooleanPlaceholder(String placeholder, ExecutePlaceholderContext ctx) bool
Resolve a boolean placeholder value.
resolveCommand(String command, ExecutePlaceholderContext ctx, {bool skipUnknown = false}) String
Resolve all placeholders in a command string.
resolvePlaceholder(String placeholder, ExecutePlaceholderContext ctx) String
Resolve a placeholder value from context.

Constants

booleanPlaceholders → const Set<String>
All known boolean placeholders that support ternary syntax.