ObslyConfig.withDefaults constructor
ObslyConfig.withDefaults({
- bool? enableScreenshotOnUi,
- List<
String> ? requestBlacklist, - List<
RequestBodyConfig> ? requestBodyWhitelist, - List<
RequestHeadersConfig> ? requestHeadersWhitelist, - TagsBlacklistConfig? tagsBlacklist,
- RageClickConfig? rageClick,
- AnonymizationConfig? anonymization,
- bool? enableCrashes,
- bool? enableLifeCycleLog,
- bool? enableRequestLog,
- bool? enableTagger,
- bool? enablePerformance,
- bool? enableMetrics,
- bool? enableUI,
- bool? automaticViewDetection,
- int? sessionMaxLengthMins,
- int? bufferSize,
- bool? captureConsole,
- bool? captureBodyOnError,
- int? messengerInterval,
- bool? enableDebugTools,
- bool? enableRules,
- ObslyTools? obslyTools,
- RateLimitsConfig? rateLimits,
- bool? enableRateLimit,
Creates a config with all default values applied This ensures consistent defaults throughout the SDK
Implementation
factory ObslyConfig.withDefaults({
bool? enableScreenshotOnUi,
List<String>? requestBlacklist,
List<RequestBodyConfig>? requestBodyWhitelist,
List<RequestHeadersConfig>? requestHeadersWhitelist,
TagsBlacklistConfig? tagsBlacklist,
RageClickConfig? rageClick,
AnonymizationConfig? anonymization,
bool? enableCrashes,
bool? enableLifeCycleLog,
bool? enableRequestLog,
bool? enableTagger,
bool? enablePerformance,
bool? enableMetrics,
bool? enableUI,
bool? automaticViewDetection,
int? sessionMaxLengthMins,
int? bufferSize,
bool? captureConsole,
bool? captureBodyOnError,
int? messengerInterval,
bool? enableDebugTools,
bool? enableRules,
ObslyTools? obslyTools,
RateLimitsConfig? rateLimits,
bool? enableRateLimit,
}) {
return ObslyConfig(
enableScreenshotOnUi: enableScreenshotOnUi ?? DefaultConfiguration.enableScreenshotOnUi,
requestBlacklist: requestBlacklist,
requestBodyWhitelist: requestBodyWhitelist,
requestHeadersWhitelist: requestHeadersWhitelist,
tagsBlacklist: tagsBlacklist,
rageClick: rageClick ??
const RageClickConfig(
active: DefaultConfiguration.rageClickActive,
screenshot: DefaultConfiguration.rageClickScreenshot,
screenshotPercent: DefaultConfiguration.rageClickScreenshotPercent,
),
anonymization: anonymization ?? _getDefaultAnonymizationConfig(),
enableCrashes: enableCrashes ?? DefaultConfiguration.enableCrashes,
enableLifeCycleLog: enableLifeCycleLog ?? DefaultConfiguration.enableLifeCycleLog,
enableRequestLog: enableRequestLog ?? DefaultConfiguration.enableRequestLog,
enableTagger: enableTagger ?? DefaultConfiguration.enableTagger,
enablePerformance: enablePerformance ?? DefaultConfiguration.enablePerformance,
enableMetrics: enableMetrics ?? DefaultConfiguration.enableMetrics,
enableUI: enableUI ?? DefaultConfiguration.enableUI,
automaticViewDetection: automaticViewDetection ?? DefaultConfiguration.automaticViewDetection,
sessionMaxLengthMins: _validateSessionLength(
sessionMaxLengthMins ?? DefaultConfiguration.sessionMaxLengthMins,
),
bufferSize: _validateBufferSize(bufferSize),
captureConsole: captureConsole ?? DefaultConfiguration.captureConsole,
captureBodyOnError: captureBodyOnError ?? DefaultConfiguration.captureBodyOnError,
messengerInterval: _validateMessengerInterval(
messengerInterval ?? DefaultConfiguration.messengerInterval,
),
enableDebugTools: enableDebugTools ?? DefaultConfiguration.enableDebugTools,
enableRules: enableRules ?? DefaultConfiguration.enableRules,
obslyTools: obslyTools,
rateLimits: rateLimits,
enableRateLimit: enableRateLimit ?? DefaultConfiguration.enableRateLimit,
);
}