improve maxHeight desktop

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
Sahil Yeole 2023-10-23 05:01:39 +05:30
parent 5109802dfb
commit 6797e8af52

View File

@ -332,10 +332,8 @@ class _ConnectionPageState extends State<ConnectionPage>
)); ));
}, },
optionsViewBuilder: (BuildContext context, AutocompleteOnSelected<Peer> onSelected, Iterable<Peer> options) { optionsViewBuilder: (BuildContext context, AutocompleteOnSelected<Peer> onSelected, Iterable<Peer> options) {
double maxHeight = 0; double maxHeight = options.length * 50;
for (var peer in options) { maxHeight = maxHeight > 200 ? 200 : maxHeight;
if (maxHeight < 200)
maxHeight += 50; };
return Align( return Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: ClipRRect( child: ClipRRect(