flutter_flight_recorder library

Records a rolling timeline of app events (errors, network, navigation, actions, logs) so QA and developers get the complete story of what happened before a bug.

Classes

FlightEvent
A single, immutable entry in the flight recorder's rolling timeline.
FlightRecorder
Records a bounded, rolling timeline of application events.
FlightRecorderConfig
Configuration for FlightRecorder.init.
FlightRecorderLifecycleObserver
Records application lifecycle transitions (resumed, inactive, paused, detached, hidden).
FlightRecorderNavigatorObserver
Records navigation transitions using Navigator 1.x's observer mechanism.
Incident
An immutable snapshot of everything known about a bug at the moment it was reported.
PrivacyConfig
Controls how Sanitizer masks and normalizes event metadata.
QaReportData
The QA-specific part of an Incident: what QA expected to happen versus what actually happened, and how severe they judged it.

Enums

EventCategory
The kind of activity a FlightEvent represents.
EventSeverity
Severity of a FlightEvent. Reused for both structured log levels (see FlightRecorder.log) and error severity (see FlightRecorder.recordError) rather than defining two identical enums.
IncidentSeverity
Bug severity as chosen by a QA reporter. Distinct from EventSeverity: this is a human-facing bug-triage classification, not a log/error severity, and the two vocabularies are intentionally not shared.

Constants

defaultSensitiveKeys → const Set<String>
Metadata keys masked by default, matched case-insensitively at every nesting depth. See PrivacyConfig.sensitiveKeys to extend or replace this set.
incidentSchemaVersion → const int
Current Incident.toJson schema version. Bump this and document the change whenever the JSON shape changes in a way existing consumers would need to account for.

Typedefs

CustomSanitizer = Object? Function(String key, Object? value)
Called for each top-level metadata entry before default masking is applied. Return the value to store (or mask it yourself and return anything non-sensitive-looking) — whatever is returned is still subject to the default sensitive-key check afterward.