homeDir top-level property
String
get
homeDir
Gets the home path based on the operating system, should only be used in server contexts
Implementation
String get homeDir {
if (Platform.isMacOS) {
return Platform.environment['HOME']!;
} else if (Platform.isLinux) {
return Platform.environment['HOME']!;
} else if (Platform.isWindows) {
return Platform.environment['UserProfile']!;
}
return Platform.environment['HOME']!;
}