TruncatingSanitizer class

Caps string length, list length, and map entry count to prevent oversized payloads.

Implemented types
Available extensions

Constructors

TruncatingSanitizer({int maxString = 1000, int maxList = 200, int maxMapEntries = 200, String overflowMarker = '…'})
Creates a truncating sanitizer with caps for strings, lists, and maps.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
maxList int
Maximum items permitted for list values.
final
maxMapEntries int
Maximum entries permitted for map values.
final
maxString int
Maximum characters permitted for string values.
final
overflowMarker String
Marker appended to indicate truncated content.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sanitize(Map<String, dynamic> data) Map<String, dynamic>
Returns a new sanitized map. The input is never mutated.
override
sanitizeEvent(ReportEvent event) ReportEvent

Available on Sanitizer, provided by the ReportEventSanitizer extension

Returns a copy of event with the sanitized payload embedded.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited