You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final cursorPosition = textEditingValue.selection.baseOffset;
I fixed it like this:
AutocompleteQuery?invokingTrigger(TextEditingValue textEditingValue) {
if (!textEditingValue.selection.isValid) {
returnnull;
}
final text = textEditingValue.text;
final cursorPosition = textEditingValue.selection.baseOffset;
In my case it happens that selection.isValid is false when the Widget is a child of a custom SliverReorderableList and I change its position by drag and drop.
The text was updated successfully, but these errors were encountered:
multi_trigger_autocomplete/lib/src/autocomplete_trigger.dart
Line 69 in 751988a
When isValid is false baseOffset and other properties are -1
So
multi_trigger_autocomplete/lib/src/autocomplete_trigger.dart
Lines 63 to 65 in 751988a
I fixed it like this:
In my case it happens that
selection.isValid
isfalse
when the Widget is a child of a custom SliverReorderableList and I change its position by drag and drop.The text was updated successfully, but these errors were encountered: