ObjectBox

This commit is contained in:
Sven committed 2025-10-23 11:28:03 +02:00
1 parent e548f62bde
commit f8317be627
60 files changed
+2367 -15049

No files matched your search

-1
View File
@@ -14,7 +14,6 @@ import 'package:stadtbote/tools/messages/job_received_message.dart';
import 'package:stadtbote/tools/messages/refresh_badges_message.dart';
import 'package:stadtbote/tools/messages/remove_job_message.dart';
import 'package:stadtbote/tools/util.dart';
import 'package:expandable/expandable.dart';
import '../tools/messages/publish_payload_message.dart';
+2 -2
View File
@@ -39,9 +39,9 @@ showTaskArrivedPopup(BuildContext context, TaskInfo taskInfo, Function() onFinis
padding: const EdgeInsets.all(35.0),
child: Column(
children: [
Text(taskInfo.task.topic),
Text(taskInfo.task?.topic ?? ''),
const SizedBox(height: 20),
getDefaultButton(taskInfo.task.topic, () => {Navigator.of(context).pop(), onFinished()}),
getDefaultButton(taskInfo.task?.topic ?? '', () => {Navigator.of(context).pop(), onFinished()}),
],
),
),
@@ -5,7 +5,7 @@ import 'package:stadtbote/tools/util.dart';
showPickupDeliveryStatusPopup(BuildContext context, TaskInfo taskInfo, Function(TourEntry?, String? remark) onFinished) async {
List<DropdownMenuEntry<TourEntry>> entries = [];
for (var entry in taskInfo.task.entries!) {
for (var entry in taskInfo.task?.entries ?? []) {
var dropdownMenuEntry = DropdownMenuEntry<TourEntry>(value: entry, label: entry.text);
entries.add(dropdownMenuEntry);
}
@@ -51,7 +51,7 @@ showPickupDeliveryStatusPopup(BuildContext context, TaskInfo taskInfo, Function(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Text(taskInfo.task.topic),
Text(taskInfo.task?.topic ?? ''),
const SizedBox(height: 20),
DropdownMenu<TourEntry>(
expandedInsets: const EdgeInsets.all(0),
@@ -6,7 +6,7 @@ import 'package:stadtbote/tools/util.dart';
showReceiptGiverPopup(BuildContext context, TaskInfo taskInfo, Function(String, TourEntry) onFinished) async {
List<DropdownMenuEntry<TourEntry>> entries = [];
for (var entry in taskInfo.task.entries!) {
for (var entry in taskInfo.task?.entries ?? []) {
var dropdownMenuEntry = DropdownMenuEntry<TourEntry>(value: entry, label: entry.text);
entries.add(dropdownMenuEntry);
}
@@ -52,7 +52,7 @@ showReceiptGiverPopup(BuildContext context, TaskInfo taskInfo, Function(String,
padding: const EdgeInsets.all(35.0),
child: Column(
children: [
Text(taskInfo.task.topic),
Text(taskInfo.task?.topic ?? ''),
const SizedBox(height: 20),
DropdownMenu<TourEntry>(
expandedInsets: const EdgeInsets.all(0),
@@ -66,7 +66,7 @@ showReceiptGiverPopup(BuildContext context, TaskInfo taskInfo, Function(String,
dropdownMenuEntries: entries,
),
const SizedBox(height: 30),
Util.getDefaultTextField(taskInfo.task.topic,
Util.getDefaultTextField(taskInfo.task?.topic ?? '',
textInputType: TextInputType.text,
formatter: [FilteringTextInputFormatter.singleLineFormatter],
controller: textEditingController,
+1 -1
View File
@@ -67,7 +67,7 @@ showSignaturePopup(BuildContext context, TaskInfo taskInfo, Function(String?) on
padding: const EdgeInsets.all(20.0),
child: Column(
children: [
Text(taskInfo.task.topic),
Text(taskInfo.task?.topic ?? ''),
const SizedBox(height: 20),
Expanded(
child: Signature(
@@ -42,11 +42,11 @@ showStationNoticePopup(BuildContext context, TaskInfo taskInfo, Function(String)
padding: const EdgeInsets.all(35.0),
child: Column(
children: [
Text(taskInfo.task.topic),
Text(taskInfo.task?.topic ?? ''),
const SizedBox(height: 20),
SizedBox(
height: 100,
child: Util.getDefaultTextField(taskInfo.task.topic,
child: Util.getDefaultTextField(taskInfo.task?.topic ?? '',
textInputType: TextInputType.text,
maxLines: 10,
formatter: [FilteringTextInputFormatter.singleLineFormatter],
@@ -128,17 +128,17 @@ Future<void> showTakePhotosPopup(BuildContext context, TaskInfo taskInfo, Functi
),
const SizedBox(height: 20),
Visibility(
visible: imageDataList.length < taskInfo.task.max!,
visible: imageDataList.length < (taskInfo.task?.max ?? 999),
child: getDefaultButton('Hinzufügen', buttonHeight: 50, () => {capturePhoto()})),
const SizedBox(height: 12),
getDefaultButton(
'Übernehmen',
buttonHeight: 50,
() => {
if (imageDataList.length >= taskInfo.task.min! && imageDataList.length <= taskInfo.task.max!)
if (imageDataList.length >= (taskInfo.task?.min ?? 0) && imageDataList.length <= (taskInfo.task?.max ?? 999))
{Navigator.of(context).pop(), onFinished(imageDataList)}
else
{showAlertDialog('Fehler', 'Es müssen mindestens ${taskInfo.task.min} Foto(s) aufgenommen werden')}
{showAlertDialog('Fehler', 'Es müssen mindestens ${taskInfo.task?.min ?? 0} Foto(s) aufgenommen werden')}
})
],
),