ViewerPosition class

A reading position: file (by reading-order index) plus the character offset inside the file's text model.

Offsets use the shared documentTextOf space, so they survive reflow (page count and columns change, the character does not).

Constructors

ViewerPosition({required int fileIndex, required int charOffset, int column = 0, int columns = 1})
Creates a visible viewer position.
const

Properties

charOffset → int
Character offset inside the file (documentText space).
final
column → int
Current column (page) inside the file.
final
columns → int
Total columns (pages) of the file at the current layout.
final
fileIndex → int
Index into book.readingOrder.
final
hashCode → int
The hash code for this object.
no setterinherited
locator → TextLocator
The current character position in Unseal's canonical locator vocabulary.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? fileIndex, int? charOffset, int? column, int? columns}) → ViewerPosition
Returns this position with the supplied visible fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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