Erweiterungen
This commit is contained in:
1 parent
8c906d6bc2
commit
eb2ffab6cd
5 files changed
+12
-4
No files matched your search
@@ -213,6 +213,8 @@ class _TaskListPageState extends State<TaskListPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _processTask(TaskInfo taskInfo) {
|
void _processTask(TaskInfo taskInfo) {
|
||||||
|
Util.logInfo("Process of Task \"${taskInfo.task.sId} started");
|
||||||
|
|
||||||
switch(taskInfo.task.type) {
|
switch(taskInfo.task.type) {
|
||||||
case 2:
|
case 2:
|
||||||
_processSignature(taskInfo);
|
_processSignature(taskInfo);
|
||||||
@@ -390,6 +392,8 @@ class _TaskListPageState extends State<TaskListPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_finishTaskProcessing(TaskInfo taskInfo) async {
|
_finishTaskProcessing(TaskInfo taskInfo) async {
|
||||||
|
Util.logInfo('Task ${taskInfo.task.sId} finished');
|
||||||
|
|
||||||
await MyApp.isarInstance.writeTxn(() async {
|
await MyApp.isarInstance.writeTxn(() async {
|
||||||
await MyApp.isarInstance.taskInfos.put(taskInfo);
|
await MyApp.isarInstance.taskInfos.put(taskInfo);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import 'package:stadtbote/tools/mqtt_core.dart';
|
|||||||
import 'package:stadtbote/tools/util.dart';
|
import 'package:stadtbote/tools/util.dart';
|
||||||
|
|
||||||
void showInfosPopup(BuildContext context, SessionStatus? status) async {
|
void showInfosPopup(BuildContext context, SessionStatus? status) async {
|
||||||
var text = "Versionsnummer: a208\n";
|
var text = "Versionsnummer: a209\n";
|
||||||
text += "Verbindungsstatus: ${MqttCore.instance.connectionState == ConnectionStateEnum.connected ? "Verbunden" : "NICHT verbunden"}\n";
|
text += "Verbindungsstatus: ${MqttCore.instance.connectionState == ConnectionStateEnum.connected ? "Verbunden" : "NICHT verbunden"}\n";
|
||||||
text += "GPS-Status: ${MyApp.currentPosition != null ? MyApp.currentPosition!.timestamp.toString() : "Unbekannt"}\n";
|
text += "GPS-Status: ${MyApp.currentPosition != null ? MyApp.currentPosition!.timestamp.toString() : "Unbekannt"}\n";
|
||||||
text += "\n";
|
text += "\n";
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ showSignaturePopup(BuildContext context, TaskInfo taskInfo, Function(String?) on
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
getDefaultButton('Übernehmen', buttonHeight: 50, () => {
|
getDefaultButton('Übernehmen', buttonHeight: 50, () => {
|
||||||
|
if (controller.points.length > 50) {
|
||||||
Navigator.of(context).pop(),
|
Navigator.of(context).pop(),
|
||||||
|
|
||||||
if (controller.points.length > 50) {
|
|
||||||
onFinished(convertPoints(controller.points))
|
onFinished(convertPoints(controller.points))
|
||||||
} else {
|
} else {
|
||||||
showAlertDialog(context, "Fehler", "Die Unterschrift ist zu kurz.")
|
showAlertDialog(context, "Fehler", "Die Unterschrift ist zu kurz.")
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class MqttCore {
|
|||||||
|
|
||||||
Util.logInfo('message received');
|
Util.logInfo('message received');
|
||||||
Util.logInfo('topic: $topic');
|
Util.logInfo('topic: $topic');
|
||||||
Util.logInfo('payload: $payload');
|
Util.logInfo('message: $payload');
|
||||||
|
|
||||||
Map<String, dynamic> messageData = jsonDecode(payload);
|
Map<String, dynamic> messageData = jsonDecode(payload);
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -196,7 +196,11 @@ Widget getDefaultButton(String text, Function() onPressed, {Image? image, double
|
|||||||
Radius.circular(15),
|
Radius.circular(15),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: onPressed,
|
onPressed: () {
|
||||||
|
Util.logInfo("Button \"$text\" clicked");
|
||||||
|
|
||||||
|
onPressed();
|
||||||
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
|||||||
Reference in new issue
Block a user