findRootDirectory function
Find root directory of this project
Implementation
String findRootDirectory(String currentPath) {
while (!File(path.join(currentPath, 'pubspec.yaml')).existsSync()) {
currentPath = path.dirname(currentPath);
}
return currentPath;
}