public static (ISpannable text, int cursorPosition) AsSpannableTextAndCursorPosition(this TextFieldInfo textFieldInfo)
        {
            var builder               = new SpannableStringBuilder();
            var finalCursorPosition   = 0;
            var currentCursorPosition = 0;

            foreach (var span in textFieldInfo.Spans)
            {
                var startingSize = builder.Length();
                builder.AppendSpan(span);

                if (span is QueryTextSpan querySpan)
                {
                    finalCursorPosition = currentCursorPosition + querySpan.CursorPosition;
                }

                currentCursorPosition += builder.Length() - startingSize;
            }

            return(builder, finalCursorPosition);
        }