pathToProjectRoot property
String
pathToProjectRoot
Determines the script project root. The project root is defined as the directory which contains the scripts 'pubspec.yaml' file.
If the script is compiled or installed by pub global activate then this will be the location of the script file.
Implementation
String get pathToProjectRoot => project.pathToProjectRoot;