From 6797e8af52c76e100e0debfb3c3f2d0416aa4f70 Mon Sep 17 00:00:00 2001 From: Sahil Yeole Date: Mon, 23 Oct 2023 05:01:39 +0530 Subject: [PATCH] improve maxHeight desktop Signed-off-by: Sahil Yeole --- flutter/lib/desktop/pages/connection_page.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flutter/lib/desktop/pages/connection_page.dart b/flutter/lib/desktop/pages/connection_page.dart index 859fd0d70..9b21727d9 100644 --- a/flutter/lib/desktop/pages/connection_page.dart +++ b/flutter/lib/desktop/pages/connection_page.dart @@ -332,10 +332,8 @@ class _ConnectionPageState extends State )); }, optionsViewBuilder: (BuildContext context, AutocompleteOnSelected onSelected, Iterable options) { - double maxHeight = 0; - for (var peer in options) { - if (maxHeight < 200) - maxHeight += 50; }; + double maxHeight = options.length * 50; + maxHeight = maxHeight > 200 ? 200 : maxHeight; return Align( alignment: Alignment.topLeft, child: ClipRRect(