TraceX class

Main entrypoint for TraceX crash capture, breadcrumb tracking, and forensic telemetry in Flutter applications.

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 Properties

crashQueue → CrashQueue?
The internal crash transmission queue instance.
no setter
isInitialized → bool
Whether the TraceX SDK has completed initialization.
no setter
onDiagnosticLog ↔ void Function(String message)?
Optional listener for diagnostic events and lifecycle logs.
getter/setter pair
projectKey → String?
The active project API key configured for telemetry ingestion.
no setter
queueLength → int
Number of crash payloads currently queued for transmission or offline storage.
no setter

Static Methods

init({required String projectKey, String? apiKey, String? endpoint, String? fallbackEndpoint, bool enableLogging = false, bool offlineBuffer = true, bool captureBreadcrumbs = true}) → Future<void>
recordBreadcrumb({required String category, required String action, required String target, Map<String, dynamic> data = const {}}) → void
Records a manual breadcrumb event with a category, action, and target.
recordError(dynamic error, StackTrace? stack, {String? reason, bool fatal = false}) → void
Manually records a caught error or exception.
recordFlutterError(FlutterErrorDetails details) → void
Records a Flutter framework error directly. Can be assigned to FlutterError.onError.
reset() → Future<void>
Resets TraceX state and dependencies. Intended for testing purposes.
runGuarded(void appRunner()) → void
Runs the app callback within a guarded zone to capture all unhandled asynchronous errors.

Constants

defaultEndpoint → const String
Default Cloudflare Edge ingestion endpoint URL.
originEndpoint → const String
Default Origin ingestion endpoint URL.