AuditReport class
The result of auditing one screen: the findings plus the meta describing the run.
The report knows the gateSeverity it should be judged against, so passes is a property of the report rather than something the caller has to recompute.
- Annotations
-
- @immutable
Constructors
-
AuditReport({required List<
Finding> findings, required AuditMeta meta, Severity gateSeverity = Severity.error, List<String> transcript = const []}) -
Creates an AuditReport.
const
-
AuditReport.fromJson(Map<
String, dynamic> json) -
Parses an AuditReport from
json.factory
Properties
-
countsBySeverity
→ Map<
Severity, int> -
The number of findings at each severity, useful for summaries.
no setter
-
findings
→ List<
Finding> -
Every finding produced for the screen, regardless of severity.
final
-
gateFailures
→ Iterable<
Finding> -
The findings that fail the gate, i.e. those at or above gateSeverity.
no setter
- gateSeverity → Severity
-
Findings at or above this severity fail the gate.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- meta → AuditMeta
-
Context about how the report was produced.
final
- passes → bool
-
Whether the screen passes: no finding is at or above gateSeverity.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transcript
→ List<
String> -
The screen-reader transcript: the announcements a screen reader would make,
in traversal order. Empty unless the audit was asked to produce it.
final
Methods
-
copyWith(
{List< String> ? transcript}) → AuditReport -
Returns a copy with
transcriptreplaced. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - The JSON representation of this report.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override