ui library
Ready-made Material UI for frame_insights.
Adds the draggable floating window (PerformanceHud), the frame-time chart (FrameTimeChart), and the detail dashboard (PerformanceDashboardPage) on top of the core library, which is re-exported from here.
Both the colors and every user-visible string are resolved from the ambient
theme: register a PerformanceTheme in your ThemeData to restyle the UI
or to switch it to another language. Without one, the widgets fall back to
the package defaults, which follow the app's ColorScheme and use English
text.
Classes
- FirstFrameTracker
- Measures the time from the start of collection to the first rendered frame.
- FrameMetrics
- What one rendered frame cost, split by thread.
- FrameTimeChart
- Draws the cost of recent frames as stacked bars: build, raster, and the remaining part of the frame span.
- InMemoryPerformanceHudStorage
- PerformanceHudStorage that keeps everything in memory.
- JankCalculator
- Turns frame timings into jank decisions and estimates.
- PerformanceDashboardPage
- Full detail view of the metrics collected by PerformanceMonitorStore.
- PerformanceHealth
- Thresholds that turn a measured startup or smoothness metric into a PerformanceHealthLevel.
- PerformanceHud
- Floating window that shows the metrics collected by PerformanceMonitorStore.
- PerformanceHudController
- Controls the floating performance window: whether it is visible, whether it is expanded, and where the user dragged it.
- PerformanceHudStorage
- Where PerformanceHudController keeps its state between launches.
- PerformanceJankRecord
- One janky frame plus the traced work that was running while it was produced.
- PerformanceMetricsAggregator
- Accumulates frames into one PerformanceReport.
- PerformanceMonitor
- Collects Flutter UI and raster timing data without sampling every frame outside the engine's existing timings callback.
- PerformanceMonitorConfig
- How a PerformanceMonitor collects and reports.
- PerformanceMonitorStore
- Keeps a rolling window of the frames and reports emitted by a PerformanceMonitor so widgets can render live metrics.
- PerformanceRebuildCounter
- Counts how often the wrapped subtree is rebuilt by its parent.
- PerformanceReport
- One report interval, summarized.
- PerformanceRouteObserver
- Reports the visible route to PerformanceMonitorStore so reports and jank records say which page they belong to.
- PerformanceSpanSample
- One measured region of work.
- PerformanceSpanScope
- Manual scope returned by PerformanceTracer.span.
- PerformanceSpanStats
- Aggregated cost of a single traced name.
- PerformanceStrings
-
Every user-visible string of the
frame_insightsUI. - PerformanceTheme
-
Colors and wording used by the
frame_insightswidgets. - PerformanceTracer
- Records named regions of work so jank can be attributed to code instead of only to frames.
-
Default PerformanceHudStorage, backed by
shared_preferences.
Enums
- JankPhase
- Which thread limited a janky frame.
- PerformanceHealthLevel
- Severity of a measured metric relative to the range a healthy build stays in.
Constants
- performanceDashboardRouteName → const String
- Route name of the built-in performance dashboard.
Functions
-
performanceDashboardRoute(
{PerformanceMonitorStore? store}) → MaterialPageRoute< void> - A route that shows the dashboard and carries performanceDashboardRouteName.
Typedefs
- PerformanceFrameCallback = void Function(FrameMetrics frame)
- Called once for every frame in an engine batch.
-
PerformanceFramesCallback
= void Function(List<
FrameMetrics> frames) -
Called once per engine batch, before each
onFrame. - PerformanceReportCallback = void Function(PerformanceReport report)
- Called whenever a report interval ends.