userAppDataPath top-level property

String userAppDataPath

Returns the user data path

On windows, it is read from the APPDATA environment variable. Otherwise it is the ~/.config folder

Implementation

String get userAppDataPath => _userAppDataPath ??= () {
      var override = platformEnvironment[userAppDataPathEnvKey];
      if (override != null) {
        return override;
      }
      if (Platform.isWindows) {
        return platformEnvironment['APPDATA'];
      }
      return null;
    }() ??
    (userHomePath == null ? null : join(userHomePath, '.config'));