Skip to content

Agent Mesh

mobile: keep whitespace out of the control plane URL field

Tomas Tormo2ac23db6d4f7
diff --git a/mobile/sam-node-app/lib/main.dart b/mobile/sam-node-app/lib/main.dart
index 6a35361a..f5c8fa53 100644
--- a/mobile/sam-node-app/lib/main.dart
+++ b/mobile/sam-node-app/lib/main.dart
@@ -1126,6 +1126,8 @@ class _NodeControlPageState extends State<NodeControlPage> {
const SizedBox(height: 30),
TextField(
controller: _controlPlaneController,
+ // A pasted URL often carries a trailing space or newline.
+ inputFormatters: [FilteringTextInputFormatter.deny(RegExp(r'\s'))],
decoration: const InputDecoration(
labelText: 'Control plane URL',
border: OutlineInputBorder(),