diff --git a/lib/src/chips_input.dart b/lib/src/chips_input.dart index efbfc2f9..0390cfb0 100644 --- a/lib/src/chips_input.dart +++ b/lib/src/chips_input.dart @@ -44,6 +44,7 @@ class ChipsInput extends StatefulWidget { this.textOverflow = TextOverflow.clip, this.obscureText = false, this.autocorrect = true, + this.ensureVisible = true, this.actionLabel, this.inputAction = TextInputAction.done, this.keyboardAppearance = Brightness.light, @@ -76,6 +77,7 @@ class ChipsInput extends StatefulWidget { final TextInputAction inputAction; final Brightness keyboardAppearance; final bool autofocus; + final bool ensureVisible; final bool allowChipEditing; final FocusNode? focusNode; final List? initialSuggestions; @@ -300,7 +302,9 @@ class ChipsInputState extends State> _textInputConnection?.show(); } - _scrollToVisible(); + if (widget.ensureVisible) { + _scrollToVisible(); + } } void _scrollToVisible() {