dartConfigDir property
The location for dart-specific configuration.
Implementation
static final String dartConfigDir = () {
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');
}
final p = path.join(configDir, r'unpub-auth');
Directory(p).createSync();
return p;
}();