getHomeDirectory static method

String getHomeDirectory()

Gets the home directory path.

Implementation

static String getHomeDirectory() {
  final env = Platform.environment;
  if (Platform.isWindows) {
    return env['USERPROFILE'] ?? env['HOME'] ?? '';
  }
  return env['HOME'] ?? '';
}