removed datumS's. But got an db error

This commit is contained in:
nico
2024-05-01 00:53:31 +02:00
parent e8304bffc2
commit 0840f21361
4 changed files with 32 additions and 34 deletions

View File

@@ -11,7 +11,6 @@ import 'package:geocoding/geocoding.dart';
// * Collection of All widgets displayed in the add_cam section
class VarTextField extends StatefulWidget {
final TextEditingController textController;
final String localization;
@@ -95,7 +94,9 @@ class _VarTextFieldState extends State<VarTextField> {
: const UnderlineInputBorder(
borderSide: BorderSide(color: Colors.grey))),
)),
const SizedBox(width: 15,),
const SizedBox(
width: 15,
),
Expanded(
flex: 1,
child: Align(
@@ -106,7 +107,11 @@ class _VarTextFieldState extends State<VarTextField> {
AsyncSnapshot<List<Map<String, dynamic>>> snapshot) {
if (snapshot.hasData) {
// Filtern der Daten, um sicherzustellen, dass keine 'null' Werte für den Schlüssel dbName vorhanden sind
var filteredData = snapshot.data!.where((item) => item[widget.dbName] != null && item[widget.dbName] != "" ).toList();
var filteredData = snapshot.data!
.where((item) =>
item[widget.dbName] != null &&
item[widget.dbName] != "")
.toList();
return PopupMenuButton<String>(
onSelected: (String value) {
setState(() {
@@ -142,8 +147,6 @@ class _VarTextFieldState extends State<VarTextField> {
);
}
// Karte
// ! completely new page
@@ -170,9 +173,6 @@ class KarteState extends State<Karte> {
Position? updatedPosition;
bool saveVisible = false;
@override
void initState() {
super.initState();
@@ -200,13 +200,12 @@ class KarteState extends State<Karte> {
Text(AppLocalizations.of(context)!.saveMap),
TextButton(
onPressed: () async {
List<Placemark> placemarks = await placemarkFromCoordinates(selectedPosition!.latitude, selectedPosition!.longitude);
List<Placemark> placemarks = await placemarkFromCoordinates(
selectedPosition!.latitude,
selectedPosition!.longitude);
if (selectedPosition != null) {
setState(() {
widget.beiOrtC.text = placemarks.first.locality!;
updatedPosition = Position(
@@ -352,7 +351,6 @@ class _DatumState extends State<Datum> {
}
}
// Status
class Status extends StatefulWidget {
@@ -882,6 +880,16 @@ class _AbbauDatState extends State<AbbauDat> {
return Text(AppLocalizations.of(context)!.nichts);
}
}),
const SizedBox(
width: 10,
),
ElevatedButton(
onPressed: () {
setState(() {
abbauDat = null;
});
},
child: const Text("X"))
]),
],
);