Composer class

Add composing to hashtag decorated text.

Expected to be used when Japanese or IME letters are typed.

Constructors

Composer({required String sourceText, required List<Detection?> detections, required TextRange composing, required int selection, required TextStyle decoratedStyle, required ValueChanged<String>? onDetectionTyped})
Creates a Composer instance to handle composing text and hashtag detections.

Properties

composing TextRange
The active composing range (underlined text during IME input).
final
decoratedStyle TextStyle
The text style applied to decorated hashtags.
final
detections List<Detection?>
The list of detected hashtag ranges and styles.
final
hashCode int
The hash code for this object.
no setterinherited
onDetectionTyped ValueChanged<String>?
Callback invoked when a hashtag or mention is typed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selection int
The current cursor selection position.
final
sourceText String
The original full text being composed.
final

Methods

callOnDetectionTyped() → void
Invokes onDetectionTyped with the text currently being typed within a hashtag.
getComposedTextSpan() TextSpan
Builds a TextSpan that handles both hashtag styling and IME composing underline.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
typingDetection() Detection?
Returns the current Detection being typed by the user based on cursor position.

Operators

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