askText method
Prompts for text input with optional defaultValue.
Implementation
@override
String askText(String question, {String? defaultValue}) {
final promptSuffix = defaultValue != null ? ' ($defaultValue)' : '';
_out.write('? $question$promptSuffix: ');
final line = _in.readLineSync()?.trim() ?? '';
if (line.isEmpty && defaultValue != null) {
return defaultValue;
}
return line;
}