defaultPrompt static method
Implementation
static String defaultPrompt(
String prompt,
String? defaultValue,
// ignore: avoid_positional_boolean_parameters
bool hidden) {
var result = prompt;
/// completely suppress the default value and the prompt if
/// the prompt is empty.
if (defaultValue != null && prompt.isNotEmpty) {
/// don't display the default value if hidden is true.
result = '$prompt [${hidden ? '******' : defaultValue}]';
}
return result;
}