handle id whitespaces for autocomplete
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
parent
f6b5c752f4
commit
bbd7cf306a
@ -226,6 +226,13 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
peers.add(Peer.fromJson(peer));
|
||||
}
|
||||
|
||||
if (textEditingValue.text.contains(" ")) {
|
||||
textEditingValue = TextEditingValue(
|
||||
text: textEditingValue.text.replaceAll(" ", ""),
|
||||
selection: textEditingValue.selection,
|
||||
);
|
||||
}
|
||||
|
||||
return peers.where((peer) =>
|
||||
peer.id.toLowerCase().contains(textEditingValue.text.toLowerCase()) ||
|
||||
peer.username.toLowerCase().contains(textEditingValue.text.toLowerCase()) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user