EditorState class
The immutable state of the code editor.
Holds the current doc, selection, resolved facet values, and
state-field values. New states are produced by calling update to
create a Transaction and then accessing transaction.state.
Constructors
-
EditorState.create({Document? doc, String? docString, EditorSelection? selection, List<
Extension> extensions = const []}) -
Create a new editor state from scratch.
factory
Properties
Methods
-
applyTransaction(
Transaction tr) → EditorState - Apply a transaction and return the new state (convenience).
-
facet<
Input, Output> (Facet< Input, Output> f) → Output - Read a resolved facet value.
-
field<
T> (StateField< T> f) → T - Read a state field value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
TransactionSpec spec) → Transaction -
Create a
Transactionfrom aTransactionSpec.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited