text method
Plain text for a Text data argument. Non-constant parts become
{placeholders}.
Implementation
String text(DartValue? v) {
final d = deref(v);
return switch (d) {
LiteralValue(value: final String s) => s,
LiteralValue(value: final Object value) => '$value',
UnknownValue(:final code) => '{$code}',
AccessValue(:final name) => '{$name}',
CallValue(:final method) => '{$method()}',
RefValue(:final last) => '{$last}',
ConditionalValue(:final then) => text(then),
_ => '',
};
}