sdkBin function
Return the path to a binary in the SDK's bin/ directory. This will handle
appending .bat or .exe on Windows. This is useful for finding the path
to SDK utilities like dartdoc, dart2js, ...
Implementation
String sdkBin(String name) {
if (!Platform.isWindows) return path.join(sdkDir.path, 'bin', name);
if (name == 'dart') return Platform.resolvedExecutable;
return path.join(sdkDir.path, 'bin', '$name.bat');
}