From 95e3fb24f3a4673ec1b9b5fe4628ceaf624ee9d9 Mon Sep 17 00:00:00 2001 From: Sahil Yeole Date: Sat, 14 Oct 2023 03:09:59 +0530 Subject: [PATCH] add ontap for autocomplete Signed-off-by: Sahil Yeole --- flutter/lib/desktop/pages/connection_page.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/flutter/lib/desktop/pages/connection_page.dart b/flutter/lib/desktop/pages/connection_page.dart index 959a94a40..a3b6d646d 100644 --- a/flutter/lib/desktop/pages/connection_page.dart +++ b/flutter/lib/desktop/pages/connection_page.dart @@ -155,7 +155,6 @@ class _ConnectionPageState extends State /// UI for the remote ID TextField. /// Search for a peer and connect to it if the id exists. Widget _buildRemoteIDTextField(BuildContext context) { - final TextEditingController fieldTextEditingController = TextEditingController.fromValue(_idController.value); var w = Container( width: 320 + 20 * 2, padding: const EdgeInsets.fromLTRB(20, 24, 20, 22), @@ -348,7 +347,13 @@ class _ConnectionPageState extends State final greyStyle = TextStyle( fontSize: 11, color: Theme.of(context).textTheme.titleLarge?.color?.withOpacity(0.6)); - final child = Container( + final child = GestureDetector( + onTap: () { + _idController.id = peer.id; + onConnect(); + }, + child: + Container( height: 42, margin: EdgeInsets.only(bottom: 5), child: Row( @@ -408,7 +413,7 @@ class _ConnectionPageState extends State ), ) ], - )); + ))); final colors = _frontN(peer.tags, 25).map((e) => gFFI.abModel.getTagColor(e)).toList(); return Tooltip(