app_directory property
Directory
get
app_directory
Implementation
static Directory get app_directory {
String? configDir;
if (Platform.isLinux) {
configDir = Platform.environment['XDG_CONFIG_HOME'] ??
path.join(Platform.environment['HOME']!, '.config');
} else if (Platform.isWindows) {
configDir = Platform.environment['APPDATA']!;
} else if (Platform.isMacOS) {
configDir = path.join(
Platform.environment['HOME']!, 'Library', 'Application Support');
} else {
configDir = path.join(Platform.environment['HOME'] ?? '', '.config');
}
return Directory(configDir);
}