fromString static method
Implementation
static ActiveWindowInfo? fromString(String? windowInfo) {
if (windowInfo == null || windowInfo.isEmpty) {
return null;
}
ActiveWindowInfo result;
if (Platform.isMacOS) {
result = ActiveWindowInfo.fromJson(windowInfo);
result.userName = Platform.environment['LOGNAME'];
} else if (Platform.isWindows) {
throw ActiveWindowError(number: 0, message: 'This could not happen!');
} else {
result = fromLinuxString(windowInfo);
}
result.rawResult = windowInfo;
return result;
}