anchor.diff:      required PubDependencyTree tree,
       required bool doUpgrade,
     }) async {
  +    Directory? temporaryFlutterSdk;
       try {
         final File fakePackage = _pubspecFor(tempDir);
         fakePackage.createSync();
  
positive.code:       );
        // Create a synthetic flutter SDK so that transitive flutter SDK
        // constraints are not affected by this upgrade.
        Directory? temporaryFlutterSdk;
        if (doUpgrade) {
          temporaryFlutterSdk = createTemporaryFlutterSdk(
            globals.logger,
  
negative.code:         );
        }
      } finally {
        // Cleanup the temporary SDK
        try {
          temporaryFlutterSdk?.deleteSync(recursive: true);
        } on FileSystemException {
          // Failed to delete temporary SDK.
        }
        tempDir.deleteSync(recursive: true);
      }
    }
  