copyWith method

FlutterCockpitConfiguration copyWith({
  1. String? initialRouteName,
  2. String? flutterVersion,
  3. CockpitTargetRegistry? registry,
  4. CockpitNativeCapture? nativeCapture,
  5. CockpitNativeRecording? nativeRecording,
  6. CockpitRemoteSessionConfiguration? remoteSession,
  7. CockpitGestureDelay? gestureDelay,
  8. CockpitSessionController? sessionController,
  9. CockpitNetworkObserver? networkObserver,
  10. CockpitHttpNetworkObserverConfiguration? httpNetworkObserver,
  11. CockpitPerformanceCollector? performanceCollector,
  12. Iterable<CockpitPerformancePlugin>? performancePlugins,
  13. CockpitRuntimeObserver? runtimeObserver,
  14. CockpitRuntimeObserverConfiguration? runtimeObserverConfiguration,
  15. CockpitInteractionPolicy? interactionPolicy,
  16. CockpitDiscoveryPolicy? discoveryPolicy,
  17. CockpitDiagnosticsConfig? diagnostics,
  18. bool clearFlutterVersion = false,
  19. bool clearRegistry = false,
  20. bool clearNativeCapture = false,
  21. bool clearNativeRecording = false,
  22. bool clearRemoteSession = false,
  23. bool clearGestureDelay = false,
  24. bool clearSessionController = false,
  25. bool clearNetworkObserver = false,
  26. bool clearHttpNetworkObserver = false,
  27. bool clearPerformanceCollector = false,
  28. bool clearRuntimeObserver = false,
  29. bool clearRuntimeObserverConfiguration = false,
  30. bool clearInteractionPolicy = false,
  31. bool clearDiscoveryPolicy = false,
  32. bool clearDiagnostics = false,
})

Implementation

FlutterCockpitConfiguration copyWith({
  String? initialRouteName,
  String? flutterVersion,
  CockpitTargetRegistry? registry,
  CockpitNativeCapture? nativeCapture,
  CockpitNativeRecording? nativeRecording,
  CockpitRemoteSessionConfiguration? remoteSession,
  CockpitGestureDelay? gestureDelay,
  CockpitSessionController? sessionController,
  CockpitNetworkObserver? networkObserver,
  CockpitHttpNetworkObserverConfiguration? httpNetworkObserver,
  CockpitPerformanceCollector? performanceCollector,
  Iterable<CockpitPerformancePlugin>? performancePlugins,
  CockpitRuntimeObserver? runtimeObserver,
  CockpitRuntimeObserverConfiguration? runtimeObserverConfiguration,
  CockpitInteractionPolicy? interactionPolicy,
  CockpitDiscoveryPolicy? discoveryPolicy,
  CockpitDiagnosticsConfig? diagnostics,
  bool clearFlutterVersion = false,
  bool clearRegistry = false,
  bool clearNativeCapture = false,
  bool clearNativeRecording = false,
  bool clearRemoteSession = false,
  bool clearGestureDelay = false,
  bool clearSessionController = false,
  bool clearNetworkObserver = false,
  bool clearHttpNetworkObserver = false,
  bool clearPerformanceCollector = false,
  bool clearRuntimeObserver = false,
  bool clearRuntimeObserverConfiguration = false,
  bool clearInteractionPolicy = false,
  bool clearDiscoveryPolicy = false,
  bool clearDiagnostics = false,
}) {
  return FlutterCockpitConfiguration(
    initialRouteName: initialRouteName ?? this.initialRouteName,
    flutterVersion: clearFlutterVersion
        ? null
        : (flutterVersion ?? this.flutterVersion),
    registry: clearRegistry ? null : (registry ?? this.registry),
    nativeCapture: clearNativeCapture
        ? null
        : (nativeCapture ?? this.nativeCapture),
    nativeRecording: clearNativeRecording
        ? null
        : (nativeRecording ?? this.nativeRecording),
    remoteSession: clearRemoteSession
        ? null
        : (remoteSession ?? this.remoteSession),
    gestureDelay: clearGestureDelay
        ? null
        : (gestureDelay ?? this.gestureDelay),
    sessionController: clearSessionController
        ? null
        : (sessionController ?? this.sessionController),
    networkObserver: clearNetworkObserver
        ? null
        : (networkObserver ?? this.networkObserver),
    httpNetworkObserver: clearHttpNetworkObserver
        ? null
        : (httpNetworkObserver ?? this.httpNetworkObserver),
    performanceCollector: clearPerformanceCollector
        ? null
        : (performanceCollector ?? this.performanceCollector),
    performancePlugins: performancePlugins == null
        ? this.performancePlugins
        : List<CockpitPerformancePlugin>.unmodifiable(performancePlugins),
    runtimeObserver: clearRuntimeObserver
        ? null
        : (runtimeObserver ?? this.runtimeObserver),
    runtimeObserverConfiguration: clearRuntimeObserverConfiguration
        ? const CockpitRuntimeObserverConfiguration()
        : (runtimeObserverConfiguration ?? this.runtimeObserverConfiguration),
    interactionPolicy: clearInteractionPolicy
        ? const CockpitInteractionPolicy()
        : (interactionPolicy ?? this.interactionPolicy),
    discoveryPolicy: clearDiscoveryPolicy
        ? const CockpitDiscoveryPolicy()
        : (discoveryPolicy ?? this.discoveryPolicy),
    diagnostics: clearDiagnostics
        ? const CockpitDiagnosticsConfig()
        : (diagnostics ?? this.diagnostics),
  );
}