getUserHomeDir function

String getUserHomeDir()

Return the user's home directory.

Implementation

String getUserHomeDir() {
  final envKey = Platform.operatingSystem == 'windows' ? 'APPDATA' : 'HOME';
  final value = Platform.environment[envKey];
  return value ?? '.';
}