Skip to content

Commit 40eb170

Browse files
author
Jorel Cruz
committed
- update _updateTextInputState function
- remove platform specific checking in composing parameter
1 parent 62d5e1d commit 40eb170

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/src/chips_input.dart

+2-8
Original file line numberDiff line numberDiff line change
@@ -349,17 +349,11 @@ class ChipsInputState<T> extends State<ChipsInput<T>>
349349
"${replaceText ? '' : _value.normalCharactersText}" +
350350
putText;
351351
setState(() {
352-
final textLength = updatedText.characters.length;
353-
final replacedLength = _chips.length;
352+
final textLength = updatedText.length;
354353
_value = _value.copyWith(
355354
text: updatedText,
356355
selection: TextSelection.collapsed(offset: textLength),
357-
composing: (Platform.isIOS || replacedLength == textLength)
358-
? TextRange.empty
359-
: TextRange(
360-
start: replacedLength,
361-
end: textLength,
362-
),
356+
composing: TextRange.empty,
363357
);
364358
});
365359
_textInputConnection ??= TextInput.attach(this, textInputConfiguration);

0 commit comments

Comments
 (0)