WidgetHighlight class

A detected widget's screen position and performance status.

Collected during tree scans and used by HighlightOverlay to draw colored borders around problematic widgets.

Constructors

WidgetHighlight({required Rect rect, required String widgetName, required IssueSeverity severity, required String detectorName, String? detail, RenderObject? renderObject, int? occurrenceId, String? stableId})
const

Properties

detail → String?
Short description of the issue.
final
detectorName → String
Which detector flagged this widget.
final
hashCode → int
The hash code for this object.
no setterinherited
occurrenceId → int?
Identity of the element this highlight was measured from: its identityHashCode, equal to the PerformanceIssue.occurrenceId of an issue tied to that one element. Null when the detector gives its highlights no element identity. Runtime only.
final
rect → Rect
The widget's bounding box in global (screen) coordinates.
final
renderObject → RenderObject?
The render object rect was measured from. Lets the overlay re-measure rect after a scroll without rescanning the tree. For a box, the overlay shows the part its ancestors' clips leave visible, and nothing while a clip (such as a list's edge) hides all of it. Null for highlights built without one; those are dropped by a rect-only refresh.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
severity → IssueSeverity
How bad the issue is — determines border color.
final
stableId → String?
PerformanceIssue.stableId of the issue this highlight belongs to, for an issue that lists several widgets (such as always_repaint_painter). The crosshair on that issue's card steps through the highlights carrying its id. Null for other highlights.
final
widgetName → String
The widget's runtime type name.
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