RitoAnnotationTarget class final
The one persisted annotation format, built and read only by the engine: a highlight stored by any Rito host resolves the same way on every other. Persist json — the engine's canonical bytes — as it is, and hand it back through RitoResolveAnnotationQuery to locate it.
The other fields are the target's contents as the engine decoded them, so a host never parses the JSON itself. Offsets are UTF-16 code units; start, end and chapterLength count into the chapter's canonical text (its raw parsed tree), so they never depend on layout.
Constructors
- RitoAnnotationTarget({required String json, required String href, required RitoSourceRange sourceRange, required String exact, required String prefix, required String suffix, required int start, required int end, required int chapterLength})
-
const
Properties
- chapterLength → int
-
final
- end → int
-
final
- exact → String
-
The highlighted text and up to 32 UTF-16 units of context on each side.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- href → String
-
Canonical manifest href of the chapter.
final
- json → String
-
The engine's canonical serialization; what a host stores.
final
- prefix → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceRange → RitoSourceRange
-
final
- start → int
-
final
- suffix → String
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override