getValidProjectPath static method
Implementation
static String getValidProjectPath(String subdirectory) {
String path = DirectoryService.choosePath();
while (Validator.isValidPath('$path/$subdirectory') == false) {
Console.writeLine(dcli.red(Constants.kFolderNotFound));
path = InputService.getValidatedInput(
consoleMessage: Constants.kEnterPath,
errorMessage: Constants.kInvalidPath,
functionValidator: Validator.isValidPath
) ?? '';
}
return path;
}