pubEnvironment property

Map<String, String> get pubEnvironment

Environment variables for dart pub and for scripts, so pub uses the project cache in project mode.

Implementation

Map<String, String> get pubEnvironment => {
  if (isProjectMode) 'PUB_CACHE': cacheDirectory,
};