inputWithValidation method
Implementation
@override
String inputWithValidation({
String prompt = 'input',
required String? Function(String) validator,
Object? defaultValue,
}) {
while (true) {
final result = input(prompt: prompt, defaultValue: defaultValue);
final validatorError = validator(result);
if (validatorError == null) {
return result;
}
logger.err(validatorError);
logger.spaces();
}
}