mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 19:47:17 +00:00
remove spaces only if number
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
@@ -265,9 +265,10 @@ class _ConnectionPageState extends State<ConnectionPage>
|
|||||||
return [emptyPeer];
|
return [emptyPeer];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (textEditingValue.text.contains(" ")) {
|
String textWithoutSpaces = textEditingValue.text.replaceAll(" ", "");
|
||||||
|
if (int.tryParse(textWithoutSpaces) != null) {
|
||||||
textEditingValue = TextEditingValue(
|
textEditingValue = TextEditingValue(
|
||||||
text: textEditingValue.text.replaceAll(" ", ""),
|
text: textWithoutSpaces,
|
||||||
selection: textEditingValue.selection,
|
selection: textEditingValue.selection,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user