DapProgressReporter.start constructor

DapProgressReporter.start(
  1. DartDebugAdapter<LaunchRequestArguments, AttachRequestArguments> adapter,
  2. String idPrefix,
  3. String title, {
  4. String? message,
})

Creates a progress reporter and sends the start event.

Implementation

factory DapProgressReporter.start(
  DartDebugAdapter adapter,
  String idPrefix,
  String title, {
  String? message,
}) {
  final supportsStandardProgress =
      adapter.initializeArgs?.supportsProgressReporting ?? false;
  final useCustomProgress = adapter.args.sendCustomProgressEvents ?? false;

  final reporter = useCustomProgress
      ? _CustomDapProgressReporter(adapter, idPrefix)
      : supportsStandardProgress
          ? _StandardDapProgressReporter(adapter, idPrefix)
          : _NoopDapProgressReporter(adapter, idPrefix);

  return reporter.._start(title, message);
}