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
+21 -20
View File
@@ -37,26 +37,27 @@ class _LocationsState extends State<Locations> {
appBar: AppBar(
title: const Text('Locations'),
),
body: Padding(
padding: const EdgeInsets.all(20),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
for (String name in locations)
ManageSingleLocation(name: name, delete: deleteLocation),
...[
const SizedBox(height: 20),
const Text("Add location by search"),
AddLocationBySearchForm(saveNewLocation: saveNewLocation),
const SizedBox(height: 20),
const Text("Add location by coordinates"),
Flexible(
fit: FlexFit.loose,
child: AddLocationsForm(
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
for (String name in locations)
ManageSingleLocation(
name: name, delete: deleteLocation),
...[
const SizedBox(height: 20),
const Text("Add location by search"),
AddLocationBySearchForm(
saveNewLocation: saveNewLocation),
const SizedBox(height: 20),
const Text("Add location by coordinates"),
AddLocationsForm(
saveNewLocation: saveNewLocation,
savedLocations: locations)),
],
]))));
savedLocations: locations),
],
])))));
}
}