MongolCandidate class
The MongolCandidate
is an overlay that shows the candidate words. It is
used by the implementation of the BaseEmbedTextInputControlState to show
the candidate words. See CommonMongolLayoutState for more details.
When the user taps a key of the soft/hard keyboard, call the convertInsert or backspace to refresh the candidate words or confirm the word to insert. Such as: pressing the English Letter key will call convertInsert to refresh the candidate words, pressing the backspace key will call backspace to delete the last character, and pressing the number key will call convertInsert select one word from the candidate words.
It has two content styles: _buildHardContent
and _buildSoftContent
.
Constructors
- MongolCandidate({required BuildContext context, required LayoutConverter layoutTextConverter, required void directInsert(String insertText), required double softLayoutTop()})
Properties
- caretLongSize ↔ double
-
caret may be vertical or horizontal, this is the long side of the caret.
getter/setter pair
-
caretRightBottomPoint
↔ Point<
double> -
The right bottom point of the caret.
getter/setter pair
- context → BuildContext
-
final
- directInsert → void Function(String insertText)
-
The callback is to insert the text directly. It is called when the user
taps the candidate word. so the
insertText
is a confirmed word and needs to insert directly without any conversion.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isVisible → bool
-
no setter
- layoutTextConverter → LayoutConverter
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- softLayoutTop → double Function()
-
The top point of the soft keyboard in the global coordinate system.
final
- typingSoftKeyboard ↔ bool
-
Tell the
MongolCandidate
whether the user is typing the soft keyboard or hard keyboard. true: soft keyboard, show the_buildSoftContent
, false: hard keyboard, show the_buildHardContent
.getter/setter pair
Methods
-
backspace(
) → bool -
convertInsert(
String text) → String? -
dismiss(
) → void -
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.
inherited