anchor.diff:  int? bar;
   ''';
       final Directory tempDir = fileSystem.systemTempDirectory.createTempSync('flutter_analyze_once_test_null_safety.');
  -    _createDotPackages(tempDir.path);
  +    _createDotPackages(tempDir.path, true);
   
       tempDir.childFile('main.dart').writeAsStringSync(contents);
       try {
  
positive.code:       flutterRootUri.write(canonicalizedFlutterRootPath);
      }
      final String dotPackagesSrc = '''
  # Generated
  flutter:$flutterRootUri/packages/flutter/lib/
  sky_engine:$flutterRootUri/bin/cache/pkg/sky_engine/lib/
  flutter_project:lib/
  ''';
      fileSystem.file(fileSystem.path.join(projectPath, '.packages'))
        ..createSync(recursive: true)
        ..writeAsStringSync(dotPackagesSrc);
    }
  
negative.code:     logger.clear();
    }
  
    void _createDotPackages(String projectPath, [bool nullSafe = false]) {
      final StringBuffer flutterRootUri = StringBuffer('file://');
      final String canonicalizedFlutterRootPath = fileSystem.path.canonicalize(Cache.flutterRoot);
      if (platform.isWindows) {
  