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).
- 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.
- IncidentAnalysis
- The result of running IncidentAnalyzer over an Incident: a normalized timeline, an inferred reproductionSteps sequence, and a short story — everything derived deterministically and entirely from the incident's own recorded evidence.
- IncidentAnalyzer
- Turns an Incident's raw, flat event list into a structured, evidence- based analysis: a normalized IncidentTimeline, an inferred ReproductionStep sequence, and a short IncidentStory.
- IncidentMarkdownExporter
- Renders an Incident and its IncidentAnalysis as a single Markdown bug report — meant to be pasted directly into Jira, Linear, GitHub Issues, Slack, email, or any other Markdown-friendly tracker.
- IncidentStory
- A short, evidence-based summary of what happened before an incident, produced by IncidentAnalyzer.
- IncidentTimeline
- A normalized, human-readable timeline built from an Incident's raw event list by IncidentAnalyzer.
- PrivacyConfig
-
Controls how
Sanitizermasks 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.
- ReproductionStep
- One numbered step in an IncidentAnalysis.reproductionSteps sequence.
- TimelineEntry
- One human-readable line in an IncidentTimeline.
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.