DiffLayout class
Immutable output of a diff layout pass.
Rows and source anchors are emitted together, so wrapping and split-panel padding cannot make hit testing disagree with the displayed content. Source keys remain stable when a new layout is produced at another width.
Constructors
-
DiffLayout({required Iterable<
String> lines, required Iterable<DiffCommentAnchor> anchors}) - Creates a snapshot, defensively copying its rows and anchors.
Properties
-
anchors
→ List<
DiffCommentAnchor> -
Source positions emitted by the same pass as lines.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
lines
→ List<
String> -
Styled terminal rows, before viewport clipping.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
anchorFor(
DiffCommentLineKey key) → DiffCommentAnchor? - Exact source lookup. Missing or outdated positions are not approximated.
-
anchorsAtRow(
int row) → List< DiffCommentAnchor> -
Source anchors actually occupying
row, found by indexed row lookup. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rowGroupEndAt(
int startRow) → int? -
First row after the aligned source group starting at
startRow. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited