NetworkUriSnapshot class final
Bounded URL and path captured from caller-owned URL text.
Uri is implementable, and no cross-platform runtime check can prove that an arbitrary instance was created by the Dart SDK. fromUri therefore uses guarded formatting in balanced mode and returns an opaque snapshot in strict mode. Callers that already own immutable URL text can bypass that boundary with fromTrustedText.
Constructors
- NetworkUriSnapshot.fromTrustedText(String url, {DiagnosticResourceLimits resourceLimits = DiagnosticResourceLimits.balanced})
-
Parses bounded URL text owned by the caller.
factory
- NetworkUriSnapshot.fromUri(Uri uri, {DiagnosticCaptureMode captureMode = DiagnosticCaptureMode.balanced, DiagnosticResourceLimits resourceLimits = DiagnosticResourceLimits.balanced})
-
Captures a bounded URL in balanced mode, or an opaque strict snapshot.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isTrusted → bool
-
Whether the snapshot came from caller-owned URL text.
final
- path → String
-
Bounded URI path or JsonValueNormalizer.unprintableValue.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → String
-
Full, bounded URI text or JsonValueNormalizer.unprintableValue.
final
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
Constants
- Opaque snapshot used when URL text cannot be read safely.