getCurrentOs function
Get the current operating system running on the computer.
Implementation
OperatingSystem getCurrentOs() {
if (Platform.isWindows) {
return OperatingSystem.windows;
} else if (Platform.isMacOS) {
return OperatingSystem.macOs;
} else if (Platform.isLinux) {
return OperatingSystem.linux;
} else {
throw const UnsupportedOsException();
}
}