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(