userHome top-level property
Directory
get
userHome
Implementation
Directory get userHome => Directory(Platform.isLinux || Platform.isMacOS
? Platform.environment['HOME'] ??
(throw StateError('HOME not defined in environment.'))
: Platform.isWindows
? Platform.environment['USERPROFILE'] ??
(throw StateError('USERPROFILE not defined in environment.'))
: Platform.isAndroid
? '/sdcard'
: throw UnsupportedError(
'userHome is not supported on ${Platform.operatingSystem}.'));