fix textToFind

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
Sahil Yeole 2023-10-20 04:50:07 +05:30
parent 00555a8e9e
commit 4651d9df68

View File

@ -259,13 +259,13 @@ class _ConnectionPageState extends State<ConnectionPage>
}
else {
String textWithoutSpaces = textEditingValue.text.replaceAll(" ", "");
String textToFind = textWithoutSpaces.toLowerCase();
if (int.tryParse(textWithoutSpaces) != null) {
textEditingValue = TextEditingValue(
text: textWithoutSpaces,
selection: textEditingValue.selection,
);
}
String textToFind = textEditingValue.text.toLowerCase();
return peers.where((peer) =>
peer.id.toLowerCase().contains(textToFind) ||