Limit the height of the search suggestions

This commit is contained in:
vishnukvmd 2022-08-13 18:55:45 +05:30
parent 12d61d16e8
commit 8df28169d6

View file

@ -39,9 +39,10 @@ class SearchSuggestionsWidget extends StatelessWidget {
borderRadius: const BorderRadius.all(Radius.circular(8)),
child: Container(
margin: const EdgeInsets.only(top: 6),
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.5,
constraints: const BoxConstraints(
maxHeight: 324,
),
child: Scrollbar(
child: ListView.builder(
physics: const ClampingScrollPhysics(),
shrinkWrap: true,
@ -72,6 +73,7 @@ class SearchSuggestionsWidget extends StatelessWidget {
),
),
),
),
);
}
}