ImeComposition class
An in-progress IME composition (e.g. CJK pinyin/kana), rendered as a transient overlay above the document rather than written into it.
While a composition is active the editor's document (rope) is left
untouched; the composing text lives only in an instance of this class and
is painted at anchor. The committed result is written to the document as
a single edit only when the platform input method finalizes the
composition. This keeps the document free of transient composing glyphs
and lets the editor render the composing string itself. displayText
preserves the platform composing string for display (for example hao'jia),
while commitText stores the user's typed intent for interruption commits.
- Annotations
Constructors
- ImeComposition({required int anchor, required String displayText, required int displayCaret, required String commitText})
-
const
Properties
- anchor → int
-
Global document offset where composition starts.
final
- commitText → String
-
The intended text to be committed if the composition is interrupted.
This is determined by the Incremental Intent Tracking algorithm to
distinguish between user-typed characters and IME-auto-generated characters.
final
- displayCaret → int
-
Local caret position within displayText.
final
- displayText → String
-
The text displayed in the IME overlay (exactly as reported by the platform).
This includes any input method decorators like pinyin separators (a'a'a'a).
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → bool
-
Whether there is no composing text (an inactive composition).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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