UpdateDiagnosticsRecorder constructor

UpdateDiagnosticsRecorder({
  1. DateTime clock()?,
  2. UpdateDiagnosticsSink? sink,
  3. String packageVersion = desktopUpdaterPackageVersion,
  4. String? platform,
  5. String channel = "stable",
  6. int maxEntries = UpdateProblemReport.maxEntries,
})

Creates an in-memory diagnostics recorder.

Implementation

UpdateDiagnosticsRecorder({
  DateTime Function()? clock,
  UpdateDiagnosticsSink? sink,
  this.packageVersion = desktopUpdaterPackageVersion,
  String? platform,
  this.channel = "stable",
  int maxEntries = UpdateProblemReport.maxEntries,
})  : _clock = clock ?? DateTime.now,
      _sink = sink,
      platform = platform ?? Platform.operatingSystem,
      _maxEntries = maxEntries < 1 ? 1 : maxEntries;