copyWith method

MonitorConfig copyWith({
  1. bool? showMemory,
  2. bool? showLogs,
  3. bool? trackStartup,
  4. bool? interceptNetwork,
  5. int? fpsWarningThreshold,
  6. int? memoryWarningThreshold,
  7. bool? enableNetworkMonitoring,
  8. bool? enableBatteryMonitoring,
  9. bool? enableDeviceInfo,
  10. LogLevel? logLevel,
  11. bool? exportLogs,
  12. bool? enableDiskMonitoring,
  13. double? diskWarningThreshold,
})

Creates a copy of this configuration with the given fields replaced

Implementation

MonitorConfig copyWith({
  bool? showMemory,
  bool? showLogs,
  bool? trackStartup,
  bool? interceptNetwork,
  int? fpsWarningThreshold,
  int? memoryWarningThreshold,
  bool? enableNetworkMonitoring,
  bool? enableBatteryMonitoring,
  bool? enableDeviceInfo,
  LogLevel? logLevel,
  bool? exportLogs,
  bool? enableDiskMonitoring,
  double? diskWarningThreshold,
}) {
  return MonitorConfig(
    showMemory: showMemory ?? this.showMemory,
    showLogs: showLogs ?? this.showLogs,
    trackStartup: trackStartup ?? this.trackStartup,
    interceptNetwork: interceptNetwork ?? this.interceptNetwork,
    fpsWarningThreshold: fpsWarningThreshold ?? this.fpsWarningThreshold,
    memoryWarningThreshold:
        memoryWarningThreshold ?? this.memoryWarningThreshold,
    enableNetworkMonitoring:
        enableNetworkMonitoring ?? this.enableNetworkMonitoring,
    enableBatteryMonitoring:
        enableBatteryMonitoring ?? this.enableBatteryMonitoring,
    enableDeviceInfo: enableDeviceInfo ?? this.enableDeviceInfo,
    logLevel: logLevel ?? this.logLevel,
    exportLogs: exportLogs ?? this.exportLogs,
    enableDiskMonitoring: enableDiskMonitoring ?? this.enableDiskMonitoring,
    diskWarningThreshold: diskWarningThreshold ?? this.diskWarningThreshold,
  );
}