dartVersion function
The Dart SDK version: the leading semver triple of Platform.version.
Implementation
String dartVersion() {
final raw = io.Platform.version;
final spaceIdx = raw.indexOf(' ');
return spaceIdx < 0 ? raw : raw.substring(0, spaceIdx);
}