listOut method
Implementation
String listOut({
StringBuffer? buffer,
String? prefix,
String Function(String)? wrapCallableKey,
String Function(String)? wrapNonCallableKey,
String Function(String)? wrapMeta,
}) {
buffer ??= StringBuffer();
if (name.startsWith('_')) return buffer.toString();
wrapCallableKey ??= (key) => key;
wrapNonCallableKey ??= (key) => key;
wrapMeta ??= (meta) => meta;
prefix ??= '';
if (description != null) {
buffer.writeln('$prefix${wrapMeta(Keys.description)}: $description');
}
if (aliases.isNotEmpty) {
buffer.writeln('$prefix${wrapMeta(Keys.aliases)}: ${aliases.join(', ')}');
}
scripts?.listOut(
buffer: buffer,
prefix: '$prefix ',
wrapCallableKey: wrapCallableKey,
wrapNonCallableKey: wrapNonCallableKey,
wrapMeta: wrapMeta,
);
return buffer.toString();
}