add locations by search

This commit is contained in:
Konstantin Kollar
2022-09-05 22:42:04 +02:00
parent 9de8e319c3
commit e93dc0f771
5 changed files with 158 additions and 5 deletions
+11 -5
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:wetter/components/locations/add_location_by_search_form.dart';
import 'package:wetter/components/locations/add_location_form.dart';
import 'package:wetter/components/locations/manage_single_location.dart';
import 'package:wetter/services/user_preferences.dart';
@@ -45,11 +46,16 @@ class _LocationsState extends State<Locations> {
for (String name in locations)
ManageSingleLocation(name: name, delete: deleteLocation),
...[
Expanded(
child: AddLocationsForm(
saveNewLocation: saveNewLocation,
savedLocations: locations),
)
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(
saveNewLocation: saveNewLocation,
savedLocations: locations)),
],
]))));
}