ComparedItem class

One thing compared, on every channel that had something to say.

Channels rather than "a picture plus some extras." Pixels have a threshold, texts are exact, and the events channel that is coming will need field masks for tokens and timestamps. Making each channel own its own rules now is what lets a new one land later without reopening the kernel — and what lets a reader who cannot see pixels, which is every agent, read the same comparison a human is looking at.

Constructors

ComparedItem({required String id, required ComparedState state, String? label, PixelChannel? pixels, TreeChannel? tree, TextChannel? texts, EventChannel? events, String? note, ({String base, String head})? retargeted, ({String base, String head})? shots, String? package})
const

Properties

channelsFired → List<String>
Which channels had something to say about this item.
no setter
deltas → List<ChannelDelta>
Every difference this item found, on every channel, as one flat list.
no setter
events → EventChannel?
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
What was compared: an entry id, or a step's path through its flow — made unique within it, see StepIds.
final
label → String?
How it names itself on screen — a step's tap #pay, an entry's name.
final
note → String?
Why it is in the state it is, when the state alone does not say: which file made it worth rendering, or which side failed to render.
final
package → String?
Which package declared it, worktree-relative — app, packages/gallery. Null on a row from a comparison written before a comparison could span several, and on a step, which takes its package from the scenario holding it.
final
pixels → PixelChannel?
final
retargeted → ({String base, String head})?
What the step aimed at on each side, when the test names its target another way than it did — a renamed key, a finder by key where there was one by index. Null for every step aimed the way it was, and for an entry.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shots → ({String base, String head})?
Where the two frames are filed, as ShotCache keys.
final
state → ComparedState
final
texts → TextChannel?
final
tree → TreeChannel?
final

Methods

inPackage(String package, {required bool qualify}) → ComparedItem
The same row, addressed inside package.
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.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromJson(Map<String, Object?> json) → ComparedItem
A row read back off index.json — what an exported page draws from.
of({required String id, String? label, PixelDiff? pixels, TreeDiff? tree, bool treeSkewed = false, List<String> baseTexts = const [], List<String> headTexts = const [], List<Map<String, Object?>> baseEvents = const [], List<Map<String, Object?>> headEvents = const [], bool baseRendered = true, bool headRendered = true, String? note, ({String base, String head})? shots}) → ComparedItem
Assembles the verdict from the channels.