Fixed bugs: overflows on location view, made location view scrollable

This commit is contained in:
Konstantin Kollar
2022-09-06 12:53:53 +02:00
parent e93dc0f771
commit 9f4b99c5f9
4 changed files with 52 additions and 43 deletions
@@ -67,8 +67,12 @@ class _AddLocationBySearchFormState extends State<AddLocationBySearchForm> {
children: [_singleResult(name: "No result")],
);
}
Iterable<LocationModel> locationsToShow = _locations!;
if (locationsToShow.length > 3) {
locationsToShow = _locations!.getRange(0, 3);
}
return Column(children: [
for (LocationModel location in _locations!.getRange(0, 3))
for (LocationModel location in locationsToShow)
_singleResult(name: location.name, location: location)
]);
}