A11yViolation class

A single accessibility issue found by an A11yRule on a live widget.

Annotations

Constructors

A11yViolation({required String ruleId, required String message, required A11ySeverity severity, String? widgetType, Rect? bounds, String? suggestedFix})
const
A11yViolation.fromJson(Map<String, Object?> json)
factory

Properties

bounds Rect?
Global screen bounds of the violating widget, used to draw the overlay outline. Absent if the widget has no render geometry.
final
hashCode int
The hash code for this object.
no setteroverride
message String
Human-readable description of what's wrong.
final
ruleId String
Id of the A11yRule that raised this violation (e.g. 'contrast').
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
severity A11ySeverity
final
suggestedFix String?
Actionable guidance for fixing the violation, shown in the overlay's detail popover.
final
widgetType String?
The widget type the violation was found on, if known — as a string (widget.runtimeType.toString()), not a Type, so a violation loaded from a JSON report (e.g. a CI baseline) compares equal to a freshly captured one.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override