currentDirectory property
String
get
currentDirectory
Implementation
static String get currentDirectory {
final directory = p.dirname(Platform.script.path);
// when running this script from the project (i.e. `flutter test`),
// the directory is where main.dart lives. We want the test directory.
if (directory.contains('/test')) {
return directory;
}
return p.join(directory, 'test');
}