setComposingRect method
- Rect rect
Send the smallest rect that covers the text in the client that's currently being composed.
If any of the 4 coordinates of the given Rect is not finite, a Rect of size (-1, -1) will be sent instead.
This information is used for positioning the IME candidates menu on each platform.
Implementation
void setComposingRect(Rect rect) {
if (rect == _cachedRect) {
return;
}
_cachedRect = rect;
final Rect validRect = rect.isFinite ? rect : Offset.zero & const Size(-1, -1);
TextInput._instance._setComposingTextRect(validRect);
}