forward method
Appends this flag to out if it was explicitly passed.
Values are emitted as separate --name value tokens so a value that
itself contains = (--dart-define BASE_URL=https://…) stays
unambiguous.
Implementation
@override
void forward(ArgResults results, List<String> out) {
if (!results.wasParsed(name)) {
return;
}
// An explicitly empty value is dropped rather than forwarded as `""`,
// matching how the previous forwarder guarded `--flavor`.
if (results[name] case final String value when value.isNotEmpty) {
out
..add('--$name')
..add(value);
}
}