EditResult class final

The outcome of applyOps.

Annotations
  • @immutable

Constructors

EditResult({required LayoutDocument document, required List<int> applied, required List<int> rejected, required List<EditOp> appliedOps, required List<EditOp> inverse, required List<EditDiagnostic> diagnostics, required Set<String> pending, required int rev, required EditRevisions revisions, required Set<String> changed, Set<String> created = const {}})
const

Properties

applied → List<int>
Indices (in the batch) of the ops that applied, and of those rejected.
final
appliedOps → List<EditOp>
The ops that applied, in order.
final
changed → Set<String>
Node ids whose node was created, changed or removed.
final
created → Set<String>
Of changed, the ids a set created (rather than replaced).
final
diagnostics → List<EditDiagnostic>
Errors (of rejected ops) and warnings, per op.
final
document → LayoutDocument
The document after the ops that applied.
final
errors → List<EditDiagnostic>
no setter
hashCode → int
The hash code for this object.
no setterinherited
inverse → List<EditOp>
Applying these (atomically) undoes appliedOps.
final
ok → bool
no setter
pending → Set<String>
Ids referenced (as children, slots or roots) but not yet defined.
final
rejected → List<int>
Indices (in the batch) of the ops that applied, and of those rejected.
final
rev → int
The document's revision after the batch (unchanged when nothing applied).
final
revisions → EditRevisions
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
warnings → List<EditDiagnostic>
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toModelJson({int maxWarnings = 20}) → Json
The tool result a model reads (ui_apply's): the revision, the ops that applied (by index, and the node ids they set, patched, moved and removed), the rejected ones with their codes, paths, what was expected and a suggestion, warnings (at most maxWarnings), the pending ids, the document's roots and size, and, when anything was rejected or is pending, next: how to fix it (patch the document as it is now; never start over).
toString() → String
A string representation of this object.
inherited
withDiagnostics(List<EditDiagnostic> extra) → EditResult
This result with extra diagnostics (render-time ones a host adds).

Operators

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