besprechung

This commit is contained in:
Nico
2025-06-03 22:31:55 +02:00
parent 07105249e2
commit 0a737f5153
22 changed files with 534 additions and 286 deletions

View File

@@ -147,16 +147,19 @@ class _ExcursionMainState extends State<ExcursionMain> {
return currentPosition;
});
if (widget.existingData?.isNotEmpty ?? false) {
for (var key in widget.existingData!.keys) {
rmap[key]!["controller"]!.text =
widget.existingData?[key].toString() ?? "";
}
} else {
// Set BLand if there is no existing data
// Set BLand and default values if there is no existing data
SharedPreferences.getInstance().then((prefs) {
rmap["BLand"]!["controller"]!.text = prefs.getString('bLand') ?? "";
});
rmap["Datum"]!["controller"]!.text = DateTime.now().toString();
}
isTemplate = widget.isTemplate;
@@ -343,7 +346,7 @@ class _ExcursionMainState extends State<ExcursionMain> {
},
),
),
child: Text(AppLocalizations.of(context)!.tracking),
child: Text(AppLocalizations.of(context)!.trackingAnAusschalten),
),
const SizedBox(height: 10),
@@ -382,12 +385,12 @@ class _ExcursionMainState extends State<ExcursionMain> {
// ---------- Track found
SpurGefunden(
spurFund: rmap["SpurFund"]!["controller"]!,
// spurLang: rmap["SpurLang"]!["controller"]!,
// spurTiere: rmap["SpurTiere"]!["controller"]!,
// spSicher: rmap["SpSicher"]!["controller"]!,
spurLang: rmap["SpurLang"]!["controller"]!,
spurTiere: rmap["SpurTiere"]!["controller"]!,
spSicher: rmap["SpSicher"]!["controller"]!,
welpenSp: rmap["WelpenSp"]!["controller"]!,
// welpenAnz: rmap["WelpenAnz"]!["controller"]!,
// wpSicher: rmap["WpSicher"]!["controller"]!,
welpenAnz: rmap["WelpenAnz"]!["controller"]!,
wpSicher: rmap["WpSicher"]!["controller"]!,
),
const Divider(),
const SizedBox(height: 20),
@@ -505,13 +508,14 @@ class _ExcursionMainState extends State<ExcursionMain> {
DatabasesEnum.excursion,
);
return;
} else if (!empty) {
await AddEntriesDialogHelper.showSaveOptionsDialog(
} else {
bool pop = await AddEntriesDialogHelper.showSaveOptionsDialog(
context,
getFieldsText(),
widget.isTemplate,
DatabasesEnum.excursion,
);
if (pop && context.mounted) Navigator.of(context).pop();
}
}
},

View File

@@ -63,7 +63,7 @@ class _StatusState extends State<BimaNutzer> {
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.nneBund),
leading: Radio<String>(
value: 'NNE-Bund',
value: 'NNE Bund',
groupValue: _selectedStatus,
onChanged: (value) {
setState(() {

View File

@@ -66,6 +66,8 @@ class _HinweiseState extends State<Hinweise> {
for (String key in props.keys) {
if (!firstRun && props[key]!) {
widget.hinweise.text += ",";
} else if (firstRun && props[key]!) {
firstRun = false;
}
if (key == "sonstiges") {
widget.hinweise.text += sonstigesController.text;
@@ -73,7 +75,6 @@ class _HinweiseState extends State<Hinweise> {
widget.hinweise.text += key;
}
firstRun = false;
}
debugPrint(widget.hinweise.text);
}

View File

@@ -24,6 +24,7 @@ class HundULeineState extends State<HundULeine> {
_selectedMHundValue = "nein";
} else {
_selectedMHundValue = widget.mHund.text;
visible = true;
}
if (widget.mLeine.text == "") {

View File

@@ -3,23 +3,23 @@ import 'package:fforte/l10n/app_localizations.dart';
class SpurGefunden extends StatefulWidget {
final TextEditingController spurFund;
// final TextEditingController spurLang;
// final TextEditingController spurTiere;
// final TextEditingController spSicher;
final TextEditingController spurLang;
final TextEditingController spurTiere;
final TextEditingController spSicher;
final TextEditingController welpenSp;
// final TextEditingController welpenAnz;
// final TextEditingController wpSicher;
final TextEditingController welpenAnz;
final TextEditingController wpSicher;
const SpurGefunden(
{super.key,
required this.spurFund,
// required this.spurLang,
// required this.spurTiere,
// required this.spSicher,
required this.welpenSp,
// required this.welpenAnz,
// required this.wpSicher,
});
const SpurGefunden({
super.key,
required this.spurFund,
required this.spurLang,
required this.spurTiere,
required this.spSicher,
required this.welpenSp,
required this.welpenAnz,
required this.wpSicher,
});
@override
State<SpurGefunden> createState() => _SpurGefundenState();
@@ -27,21 +27,27 @@ class SpurGefunden extends StatefulWidget {
class _SpurGefundenState extends State<SpurGefunden> {
late bool _spurFundChecked;
// bool _spSicher = false;
// bool _wpSicher = false;
bool _spSicher = false;
bool _wpSicher = false;
late bool _welpenSpFundChecked;
@override
void initState() {
if (widget.spurFund.text == "") {
_spurFundChecked = false;
_welpenSpFundChecked = false;
} else {
_spurFundChecked = true;
_welpenSpFundChecked = true;
void initState() {
if (widget.spurFund.text == "") {
_spurFundChecked = false;
_welpenSpFundChecked = false;
} else {
_spurFundChecked = true;
_welpenSpFundChecked = true;
if (widget.wpSicher.text != "") {
_wpSicher = true;
}
if (widget.spSicher.text != "") {
_spSicher = true;
}
super.initState();
}
super.initState();
}
@override
Widget build(BuildContext context) {
@@ -59,106 +65,166 @@ class _SpurGefundenState extends State<SpurGefunden> {
});
},
),
Text(AppLocalizations.of(context)!.welpenSpurGefunden),
Checkbox(
value: _welpenSpFundChecked,
onChanged: (val) {
setState(() {
_welpenSpFundChecked = val ?? false;
widget.welpenSp.text = val ?? false ? "WelpenSp" : "";
});
},
),
// Text(AppLocalizations.of(context)!.welpenSpurGefunden),
// Checkbox(
// value: _welpenSpFundChecked,
// onChanged: (val) {
// setState(() {
// _welpenSpFundChecked = val ?? false;
// widget.welpenSp.text = val ?? false ? "WelpenSp" : "";
// });
// },
// ),
],
),
// Visibility(
// visible: _spurFundChecked,
// child: Column(
// children: [
// Align(
// alignment: Alignment.bottomLeft,
// child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)),
// TextField(
// keyboardType: TextInputType.number,
// controller: widget.spurLang,
// ),
// const SizedBox(
// height: 30,
// ),
// Align(
// alignment: Alignment.bottomLeft,
// child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)),
// TextField(
// keyboardType: TextInputType.number,
// controller: widget.spurTiere,
// ),
// Row(
// children: [
// Text(AppLocalizations.of(context)!.sicher),
// Checkbox(
// value: _spSicher,
// onChanged: (val) {
// setState(() {
// _spSicher = val ?? false;
// widget.spSicher.text = _spSicher ? "sicher" : "unsicher";
// });
// }),
// ],
// ),
// const SizedBox(
// height: 10,
// ),
// Row(
// children: [
// Text(AppLocalizations.of(context)!.welpenSpurGefunden),
// Checkbox(
// value: _welpenSp,
// onChanged: (val) {
// setState(() {
// _welpenSp = val ?? false;
// });
// },
// ),
// ],
// ),
// Visibility(
// visible: _welpenSp,
// child: Column(
// children: [
// Align(
// alignment: Alignment.bottomLeft,
// child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)),
// TextField(
// keyboardType: TextInputType.number,
// controller: widget.welpenSp,
// ),
// const SizedBox(height: 20,),
// Align(
// alignment: Alignment.bottomLeft,
// child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)),
// TextField(
// keyboardType: TextInputType.number,
// controller: widget.welpenAnz,
// ),
// Row(
// children: [
// Text(AppLocalizations.of(context)!.sicher),
// Checkbox(
// value: _wpSicher,
// onChanged: (val) {
// setState(() {
// _wpSicher = val ?? false;
// widget.spSicher.text =
// _spSicher ? "sicher" : "unsicher";
// });
// }),
// ],
// ),
// ],
// )),
// ],
// ),
// ),
Visibility(
visible: _spurFundChecked,
child: Column(
children: [
Row(
children: [
Expanded(
flex: 7,
child: Align(
alignment: Alignment.bottomLeft,
child: Text(
AppLocalizations.of(context)!.gesLaengeAllerDokSpuren,
),
),
),
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.number,
controller: widget.spurLang,
),
),
],
),
// const SizedBox(height: 10),
Row(
children: [
Expanded(
flex: 7,
child: Align(
alignment: Alignment.bottomLeft,
child: Text(
AppLocalizations.of(
context,
)!.maxAnzahlZusGefaehrdeterTiere,
),
),
),
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.number,
controller: widget.spurTiere,
),
),
],
),
Row(
children: [
Text(AppLocalizations.of(context)!.sicher),
Checkbox(
value: _spSicher,
onChanged: (val) {
setState(() {
_spSicher = val ?? false;
widget.spSicher.text =
_spSicher ? "sicher" : "unsicher";
});
},
),
],
),
// const SizedBox(height: 10),
Row(
children: [
Text(AppLocalizations.of(context)!.welpenSpurGefunden),
Checkbox(
value: _welpenSpFundChecked,
onChanged: (val) {
setState(() {
_welpenSpFundChecked = val ?? false;
});
},
),
],
),
Visibility(
visible: _welpenSpFundChecked,
child: Column(
children: [
Row(
children: [
Expanded(
flex: 7,
child: Align(
alignment: Alignment.bottomLeft,
child: Text(
AppLocalizations.of(
context,
)!.gesLaengeAllerDokWelpenSpuren,
),
),
),
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.number,
controller: widget.welpenSp,
),
),
],
),
// const SizedBox(height: 10),
Row(
children: [
Expanded(
flex: 7,
child: Align(
alignment: Alignment.bottomLeft,
child: Text(
AppLocalizations.of(
context,
)!.maxAnzahlZusGefaehrdeterTiere,
),
),
),
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.number,
controller: widget.welpenAnz,
),
),
],
),
Row(
children: [
Text(AppLocalizations.of(context)!.sicher),
Checkbox(
value: _wpSicher,
onChanged: (val) {
setState(() {
_wpSicher = val ?? false;
widget.spSicher.text =
_spSicher ? "sicher" : "unsicher";
});
},
),
],
),
],
),
),
],
),
),
],
);
}

View File

@@ -175,7 +175,7 @@ class _TrackingState extends State<Tracking> {
),
),
if (positionStreamRunning)
IconButton(
TextButton(
onPressed: () {
setState(() {
positionStreamRunning = false;
@@ -183,12 +183,9 @@ class _TrackingState extends State<Tracking> {
NotificationService().deleteNotification();
});
},
icon: Icon(
Icons.stop_rounded,
color: Theme.of(context).colorScheme.errorContainer,
),
child: Text(AppLocalizations.of(context)!.trackingStop),
),
IconButton(
TextButton(
onPressed: () {
if (positionStreamRunning) {
positionStreamRunning = false;
@@ -199,10 +196,10 @@ class _TrackingState extends State<Tracking> {
}
setState(() {});
},
icon:
child:
positionStreamRunning
? Icon(Icons.pause)
: Icon(Icons.play_arrow),
? Text(AppLocalizations.of(context)!.trackingPause)
: Text(AppLocalizations.of(context)!.trackingStart)
),
],
),

View File

@@ -4,7 +4,6 @@ import 'package:fforte/screens/sharedMethods/http_request.dart';
import 'package:fforte/screens/sharedMethods/save_file.dart';
import 'package:fforte/screens/sharedMethods/save_template.dart';
import 'package:fforte/screens/sharedMethods/save_main_entry.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:fforte/l10n/app_localizations.dart';
import 'package:geolocator/geolocator.dart';
@@ -106,15 +105,16 @@ class AddEntriesDialogHelper {
);
}
static Future<void> showSaveOptionsDialog(
static Future<bool> showSaveOptionsDialog(
BuildContext context,
Map<String, String> saveData,
bool isTemplate,
DatabasesEnum dbType,
) async {
bool isLoading = false;
bool pop = false;
return showDialog(
await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
@@ -136,6 +136,7 @@ class AddEntriesDialogHelper {
if (!isLoading)
TextButton(
onPressed: () async {
pop = true;
setState(() => isLoading = true);
saveTemplate(saveData, dbType);
Navigator.pushNamedAndRemoveUntil(
@@ -143,6 +144,13 @@ class AddEntriesDialogHelper {
'/home',
(route) => false,
);
if (context.mounted) {
SnackBarHelper.showSnackBarMessage(
context,
AppLocalizations.of(context)!.erfolgreich,
);
}
},
child: Text(AppLocalizations.of(context)!.template),
),
@@ -177,6 +185,7 @@ class AddEntriesDialogHelper {
sent: true,
);
showSuccessDialog(context);
pop = true;
}
},
child: Text(AppLocalizations.of(context)!.sendtoserver),
@@ -187,7 +196,7 @@ class AddEntriesDialogHelper {
setState(() => isLoading = true);
try {
SaveMainEntryMethod.saveEntry(
int id = await SaveMainEntryMethod.saveEntry(
entryData: saveData,
isTemplate: isTemplate,
dbType: dbType,
@@ -196,12 +205,20 @@ class AddEntriesDialogHelper {
if (context.mounted) {
await SaveFileMethod.saveFile(
saveData,
id,
dbType == DatabasesEnum.place
? AppLocalizations.of(context)!.justplace
: AppLocalizations.of(context)!.excursion,
dbType,
);
if (context.mounted) Navigator.of(context).pop();
if (context.mounted) {
Navigator.of(context).pop();
SnackBarHelper.showSnackBarMessage(
context,
AppLocalizations.of(context)!.erfolgreich,
);
}
pop = true;
}
} catch (_) {
// User cancelled the dialog
@@ -233,6 +250,13 @@ class AddEntriesDialogHelper {
'/home',
(route) => false,
);
pop = true;
if (context.mounted) {
SnackBarHelper.showSnackBarMessage(
context,
AppLocalizations.of(context)!.erfolgreich,
);
}
} catch (e) {
debugPrint(e.toString());
}
@@ -252,6 +276,8 @@ class AddEntriesDialogHelper {
);
},
);
return pop;
}
static Future<void> showSuccessDialog(BuildContext context) async {

View File

@@ -12,17 +12,20 @@ class IntroScreen extends StatefulWidget {
class _IntroScreenState extends State<IntroScreen> {
TextEditingController addresse1C = TextEditingController();
TextEditingController bLandC = TextEditingController();
TextEditingController apiAddress = TextEditingController();
TextEditingController ffApiAddress = TextEditingController();
TextEditingController exApiAddress = TextEditingController();
String selectedApiAddress = "Test";
String? selectedBLand;
String selectedFFApiAddress = "Test";
String selectedEXApiAddress = "Test";
String? selectedBLand = "Sachsen";
Future<void> _saveData() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setString('addresse1', addresse1C.text);
await prefs.setString('bLand', bLandC.text);
await prefs.setBool('isFirstLaunch', false);
await prefs.setString('apiAddress', apiAddress.text);
await prefs.setString('fotofallenApiAddress', ffApiAddress.text);
await prefs.setString('exkursionenApiAddress', exApiAddress.text);
}
@override
@@ -35,9 +38,10 @@ class _IntroScreenState extends State<IntroScreen> {
Future.delayed(Duration.zero, () async {
SharedPreferences prefs = await SharedPreferences.getInstance();
setState(() {
apiAddress.text = prefs.getString('apiAddress') ?? "";
ffApiAddress.text = prefs.getString('fotofallenApiAddress') ?? "";
exApiAddress.text = prefs.getString('exkursionenApiAddress') ?? "";
addresse1C.text = prefs.getString('addresse1') ?? "";
bLandC.text = prefs.getString('bLand') ?? "";
bLandC.text = prefs.getString('bLand') ?? "Sachsen";
});
});
}
@@ -71,88 +75,89 @@ class _IntroScreenState extends State<IntroScreen> {
Expanded(
flex: 4,
child: TextField(
readOnly: true,
controller: bLandC,
),
),
Expanded(
flex: 1,
child: PopupMenuButton(
icon: const Icon(Icons.arrow_drop_down),
initialValue: selectedBLand,
onSelected: (value) {
setState(() {
selectedBLand = value;
bLandC.text = value;
});
},
itemBuilder: (context) => const <PopupMenuEntry>[
PopupMenuItem(
value: 'Baden-Württemberg',
child: Text('Baden-Württemberg'),
),
PopupMenuItem(
value: 'Bayern',
child: Text('Bayern'),
),
PopupMenuItem(
value: 'Berlin',
child: Text('Berlin'),
),
PopupMenuItem(
value: 'Brandenburg',
child: Text('Brandenburg'),
),
PopupMenuItem(
value: 'Bremen',
child: Text('Bremen'),
),
PopupMenuItem(
value: 'Hamburg',
child: Text('Hamburg'),
),
PopupMenuItem(
value: 'Hessen',
child: Text('Hessen'),
),
PopupMenuItem(
value: 'Mecklenburg-Vorpommern',
child: Text('Mecklenburg-Vorpommern'),
),
PopupMenuItem(
value: 'Niedersachsen',
child: Text('Niedersachsen'),
),
PopupMenuItem(
value: 'Nordrhein-Westfalen',
child: Text('Nordrhein-Westfalen'),
),
PopupMenuItem(
value: 'Rheinland-Pfalz',
child: Text('Rheinland-Pfalz'),
),
PopupMenuItem(
value: 'Saarland',
child: Text('Saarland'),
),
PopupMenuItem(
value: 'Sachsen',
child: Text('Sachsen'),
),
PopupMenuItem(
value: 'Sachsen-Anhalt',
child: Text('Sachsen-Anhalt'),
),
PopupMenuItem(
value: 'Schleswig-Holstein',
child: Text('Schleswig-Holstein'),
),
PopupMenuItem(
value: 'Thüringen',
child: Text('Thüringen'),
),
],
),
),
// Expanded(
// flex: 1,
// child: PopupMenuButton(
// icon: const Icon(Icons.arrow_drop_down),
// initialValue: selectedBLand,
// onSelected: (value) {
// setState(() {
// selectedBLand = value;
// bLandC.text = value;
// });
// },
// itemBuilder: (context) => const <PopupMenuEntry>[
// PopupMenuItem(
// value: 'Baden-Württemberg',
// child: Text('Baden-Württemberg'),
// ),
// PopupMenuItem(
// value: 'Bayern',
// child: Text('Bayern'),
// ),
// PopupMenuItem(
// value: 'Berlin',
// child: Text('Berlin'),
// ),
// PopupMenuItem(
// value: 'Brandenburg',
// child: Text('Brandenburg'),
// ),
// PopupMenuItem(
// value: 'Bremen',
// child: Text('Bremen'),
// ),
// PopupMenuItem(
// value: 'Hamburg',
// child: Text('Hamburg'),
// ),
// PopupMenuItem(
// value: 'Hessen',
// child: Text('Hessen'),
// ),
// PopupMenuItem(
// value: 'Mecklenburg-Vorpommern',
// child: Text('Mecklenburg-Vorpommern'),
// ),
// PopupMenuItem(
// value: 'Niedersachsen',
// child: Text('Niedersachsen'),
// ),
// PopupMenuItem(
// value: 'Nordrhein-Westfalen',
// child: Text('Nordrhein-Westfalen'),
// ),
// PopupMenuItem(
// value: 'Rheinland-Pfalz',
// child: Text('Rheinland-Pfalz'),
// ),
// PopupMenuItem(
// value: 'Saarland',
// child: Text('Saarland'),
// ),
// PopupMenuItem(
// value: 'Sachsen',
// child: Text('Sachsen'),
// ),
// PopupMenuItem(
// value: 'Sachsen-Anhalt',
// child: Text('Sachsen-Anhalt'),
// ),
// PopupMenuItem(
// value: 'Schleswig-Holstein',
// child: Text('Schleswig-Holstein'),
// ),
// PopupMenuItem(
// value: 'Thüringen',
// child: Text('Thüringen'),
// ),
// ],
// ),
// ),
],
),
const SizedBox(
@@ -165,25 +170,61 @@ class _IntroScreenState extends State<IntroScreen> {
child: TextField(
decoration: InputDecoration(
hintText:
AppLocalizations.of(context)!.apiaddress),
controller: apiAddress,
AppLocalizations.of(context)!.ffApiAddress),
controller: ffApiAddress,
),
),
Expanded(
flex: 1,
child: PopupMenuButton(
icon: const Icon(Icons.arrow_drop_down),
initialValue: selectedApiAddress,
initialValue: selectedFFApiAddress,
onSelected: (value) {
setState(() {
selectedApiAddress = value;
apiAddress.text = value;
selectedFFApiAddress = value;
ffApiAddress.text = value;
});
},
itemBuilder: (context) => <PopupMenuEntry>[
PopupMenuItem(
value:
"http://192.168.1.106/www.dbb-wolf.de/data/app24.php",
"http://192.168.1.106/www.dbb-wolf.de/data/app24.php",
child:
Text(AppLocalizations.of(context)!.test)),
PopupMenuItem(
value: "...",
child: Text(
AppLocalizations.of(context)!.notest))
],
))
],
),
Row(
children: [
Expanded(
flex: 4,
child: TextField(
decoration: InputDecoration(
hintText:
AppLocalizations.of(context)!.exApiAddress),
controller: exApiAddress,
),
),
Expanded(
flex: 1,
child: PopupMenuButton(
icon: const Icon(Icons.arrow_drop_down),
initialValue: selectedEXApiAddress,
onSelected: (value) {
setState(() {
selectedEXApiAddress = value;
exApiAddress.text = value;
});
},
itemBuilder: (context) => <PopupMenuEntry>[
PopupMenuItem(
value:
"http://192.168.1.106/www.dbb-wolf.de/data/app24.php",
child:
Text(AppLocalizations.of(context)!.test)),
PopupMenuItem(

View File

@@ -19,8 +19,13 @@ class HttpRequest {
Response(requestOptions: RequestOptions(path: ''), statusCode: 400);
try {
response = await dio.post(prefs.getString('apiAddress') ?? "",
if (saveDataMap != null && saveDataMap.containsKey("CID") || saveDataString != null && saveDataString.contains("CID")) {
response = await dio.post(prefs.getString('fotofallenApiAddress') ?? "",
data: saveDataMap == null ? saveDataString : jsonEncode(saveDataMap));
} else {
response = await dio.post(prefs.getString('exkursionenApiAddress') ?? "",
data: saveDataMap == null ? saveDataString : jsonEncode(saveDataMap));
}
return response.statusCode!;
} on DioException {

View File

@@ -10,6 +10,7 @@ import 'package:shared_preferences/shared_preferences.dart';
class SaveFileMethod {
static Future<void> saveFile(
Map<String, String> place,
int id,
String fileNameLocalization,
DatabasesEnum dbType,
) async {
@@ -26,7 +27,7 @@ class SaveFileMethod {
await prefs.setString('saveDir', selectedDirectory);
File file = File(
'$selectedDirectory/$fileNameLocalization-${dbType == DatabasesEnum.place ? place["CID"] : place["LogDat"]}.txt',
'$selectedDirectory/$fileNameLocalization-$id-${dbType == DatabasesEnum.place ? place["CID"] : place["Datum"]!.split(" ").first}.txt',
);
await file.writeAsString(jsonPlace);

View File

@@ -4,7 +4,7 @@ import 'package:fforte/methods/excursion_db_helper.dart';
import 'package:fforte/methods/place_db_helper.dart';
class SaveMainEntryMethod {
static void saveEntry({
static Future<int> saveEntry({
required Map<String, String> entryData,
required bool isTemplate,
required DatabasesEnum dbType,
@@ -34,5 +34,7 @@ class SaveMainEntryMethod {
placeDB.updateSent(entryId); // Update 'Sent' using the correct ID
}
return entryId;
}
}

View File

@@ -39,8 +39,7 @@ class _SendFileState extends State<SendFile> {
ElevatedButton(
onPressed: () async {
final dio = Dio();
final SharedPreferences prefs =
await SharedPreferences.getInstance();
final SharedPreferences prefs = await SharedPreferences.getInstance();
String? fileContent = await pickedFile?.readAsString();
dio.options.responseType = ResponseType.plain;