redactAdditionalData method
Applies redaction to an additionalData map if redaction is active.
Returns the original map unchanged when redaction is not active.
Implementation
Map<String, dynamic>? redactAdditionalData(
Map<String, dynamic>? data,
) {
final redactorInstance = redactor;
if (data == null || !isRedactionActive || redactorInstance == null) {
return data;
}
return data.map(
(key, value) => MapEntry(
key,
redactorInstance.redact(value, keyName: key),
),
);
}