anchor.diff:  // Use of this source code is governed by a BSD-style license that can be
   // found in the LICENSE file.
   
  -// @dart=2.9
  +// ignore_for_file: import_of_legacy_library_into_null_safe
   
   import 'dart:async';
   
  
positive.code: /// https://github.com/dart-lang/sdk/issues/34656
  Stream<T> convertBroadcastToSingleSubscriber<T>(Stream<T> stream) {
    final StreamController<T> controller = StreamController<T>();
    StreamSubscription<T> subscription;
    controller.onListen =
        () => subscription = stream.listen((T e) => controller.add(e));
    controller.onCancel = () => subscription.cancel();
  
negative.code:       ? uri.replace(scheme: 'http')
        : uri.replace(scheme: 'https');
    final client = SseClient('$uri');
    final Stream<String>? stream =
        client.stream?.asBroadcastStream() as Stream<String>?;
    final service = VmServiceWrapper.fromNewVmService(
      stream,
      client.sink!.add,
      uri,
    );
  
    unawaited(client.sink?.done.whenComplete(() {
      finishedCompleter.complete();
      service.dispose();
    }));
    serviceCompleter.complete(service);
  
    unawaited(stream?.drain().catchError(onError));
    return serviceCompleter.future;
  }
  
  