anchor.diff:    // The cached JSON Flutter version information from 'flutter --version --machine'.
     String? _flutterVersion;
   
  -  Future<ProcessResult> _runSnippetsScript(List<String> args) async {
  +  Future<Process> _runSnippetsScript(List<String> args) async {
       final String workingDirectory = path.join(_flutterRoot, 'dev', 'docs');
       if (_flutterVersion == null) {
         // Capture the flutter version information once so that the snippets tool doesn't
         // have to run it for every snippet.
  +      if (verbose) {
  +        print(<String>[_flutter, '--version', '--machine'].join(' '));
  +      }
         final ProcessResult versionResult = Process.runSync(_flutter, <String>['--version', '--machine']);
  +      if (verbose) {
  +        stdout.write(versionResult.stdout);
  +        stderr.write(versionResult.stderr);
  +      }
         _flutterVersion = versionResult.stdout as String? ?? '';
       }
  -    return Process.run(
  +    if (verbose) {
  +      print(<String>[
  +        Platform.resolvedExecutable,
  +        'pub',
  +        'global',
  +        'run',
  +        'snippets',
  +        ...args,
  +      ].join(' '));
  +    }
  +    return Process.start(
         Platform.resolvedExecutable,
         <String>[
           'pub',
  
positive.code:     final String sampleId = _createNameFromSource('sample', sample.start.filename, sample.start.line);
      final String inputName = '$sampleId.input';
      // Now we have a filename like 'lib.src.material.foo_widget.123.dart' for each snippet.
      final File inputFile = File(path.join(_tempDirectory.path, inputName))..createSync(recursive: true);
      inputFile.writeAsStringSync(sample.input.join('\n'));
      final File outputFile = File(path.join(_tempDirectory.path, '$sampleId.dart'));
      final List<String> args = <String>[
  
negative.code:       '--no-format-output',
        ...sample.args,
      ];
      if (verbose) {
        print('Generating sample for ${sample.start.filename}:${sample.start.line}');
      }
      final Process process = await _runSnippetsScript(args);
      if (verbose) {
        process.stdout.transform(utf8.decoder).forEach(stdout.write);
      }
      process.stderr.transform(utf8.decoder).forEach(stderr.write);
      final int exitCode = await process.exitCode.timeout(const Duration(seconds: 30), onTimeout: () {
        stderr.writeln('Snippet script timed out.');
        return -1;
      });
      if (exitCode != 0) {
        throw SampleCheckerException(
          'Unable to create sample for ${sample.start.filename}:${sample.start.line} '
          '(using input from ${inputFile.path}).',
          file: sample.start.filename,
          line: sample.start.line,
        );
  