userAppDataPath top-level property

String get 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;
    }() ??
    join(userHomePath, '.config');