copyWith method

Contexts copyWith({
  1. SentryDevice? device,
  2. SentryOperatingSystem? operatingSystem,
  3. List<SentryRuntime>? runtimes,
  4. SentryApp? app,
  5. SentryBrowser? browser,
  6. SentryGpu? gpu,
})

Implementation

Contexts copyWith({
  SentryDevice? device,
  SentryOperatingSystem? operatingSystem,
  List<SentryRuntime>? runtimes,
  SentryApp? app,
  SentryBrowser? browser,
  SentryGpu? gpu,
}) =>
    Contexts(
      device: device ?? this.device,
      operatingSystem: operatingSystem ?? this.operatingSystem,
      runtimes: runtimes ?? this.runtimes,
      app: app ?? this.app,
      browser: browser ?? this.browser,
      gpu: gpu ?? this.gpu,
    )..addEntries(
        entries.where((element) => !_defaultFields.contains(element.key)),
      );