Utils class
Constructors
- Utils()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
applyPayloadLimit(
String? payload) → String? -
Returns
payloadunchanged when its length is ≤ 1024 characters, ornullwhen it exceeds the limit. Bodies over the limit are dropped entirely rather than truncated to avoid sending partial/misleading data. -
buildCaptureContext(
{required String url, required List< CxNetworkCaptureRule> rules, required Map<String, String> reqHeaders, Map<String, String> ? resHeaders, String? requestPayload, String? responsePayload}) → Map<String, dynamic> -
Resolves the first matching CxNetworkCaptureRule for
urland returns a map of the capture-sensitive fields (request/response headers and payloads) that should be included in a network telemetry span. -
filterHeaders(
Map< String, String> headers, List<String> allowlist) → Map<String, String> -
Filters
headersto only those whose name (case-insensitive) appears inallowlist. Output keys use the casing fromallowlist(mirrors Android SDK behaviour). -
generateHex(
int length) → String -
Generates a hex string of
lengthcharacters using a cryptographically secure RNG. -
resolveNetworkCaptureRule(
String url, List< CxNetworkCaptureRule> rules) → CxNetworkCaptureRule? -
Returns the first CxNetworkCaptureRule whose
urlexactly matches or whoseurlPatternregex matchesurl. Returns null if no rule matches. -
shouldAddTraceParent(
String? requestURLString, CXExporterOptions options) → bool