Erweiterungen
This commit is contained in:
1 parent
a987983b63
commit
85e973c3dd
3 files changed
+13
-4
No files matched your search
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:signature/signature.dart';
|
import 'package:signature/signature.dart';
|
||||||
import 'package:stadtbote/model/task_info.dart';
|
import 'package:stadtbote/model/task_info.dart';
|
||||||
import 'package:stadtbote/tools/util.dart';
|
import 'package:stadtbote/tools/util.dart';
|
||||||
@@ -9,7 +10,13 @@ showSignaturePopup(BuildContext context, TaskInfo taskInfo, Function(String?) on
|
|||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
onWillPop: () async {
|
onWillPop: () async {
|
||||||
return await taskDialogSecurityException(context);
|
var result = await taskDialogSecurityException(context);
|
||||||
|
|
||||||
|
if (result) {
|
||||||
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
},
|
},
|
||||||
child: AlertDialog(
|
child: AlertDialog(
|
||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class MqttCore {
|
|||||||
|
|
||||||
_mqttClient = MqttServerClient.withPort(_brokerUri, clientId, _brokerPort);
|
_mqttClient = MqttServerClient.withPort(_brokerUri, clientId, _brokerPort);
|
||||||
_mqttClient!.logging(on: false);
|
_mqttClient!.logging(on: false);
|
||||||
_mqttClient!.keepAlivePeriod = 5;
|
_mqttClient!.keepAlivePeriod = 60;
|
||||||
_mqttClient!.disconnectOnNoResponsePeriod = 10;
|
_mqttClient!.disconnectOnNoResponsePeriod = 10;
|
||||||
_mqttClient!.autoReconnect = true;
|
_mqttClient!.autoReconnect = true;
|
||||||
_mqttClient!.onDisconnected = _clientDisconnected;
|
_mqttClient!.onDisconnected = _clientDisconnected;
|
||||||
@@ -146,6 +146,7 @@ class MqttCore {
|
|||||||
_mqttClient!.publishMessage(messageTopic, MqttQos.exactlyOnce, buffer);
|
_mqttClient!.publishMessage(messageTopic, MqttQos.exactlyOnce, buffer);
|
||||||
|
|
||||||
Util.logInfo("message\n$text\nsend to $messageTopic");
|
Util.logInfo("message\n$text\nsend to $messageTopic");
|
||||||
|
Util.logInfo("size in bytes: ${buffer.length}");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
@@ -170,6 +171,7 @@ class MqttCore {
|
|||||||
var topic = topicArraySplited[6];
|
var topic = topicArraySplited[6];
|
||||||
|
|
||||||
Util.logInfo('message received\ntopic: $topic\n');
|
Util.logInfo('message received\ntopic: $topic\n');
|
||||||
|
Util.logInfo("size in bytes: ${message.payload.message.length.toString()}");
|
||||||
|
|
||||||
var messageBytes = message.payload.message;
|
var messageBytes = message.payload.message;
|
||||||
String payload = utf8.decode(GZipDecoder().decodeBytes(messageBytes));
|
String payload = utf8.decode(GZipDecoder().decodeBytes(messageBytes));
|
||||||
@@ -484,7 +486,7 @@ class MqttCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _startTrackTimer() {
|
void _startTrackTimer() {
|
||||||
_trackTimer ??= Timer.periodic(const Duration(seconds: 60), (Timer t) {
|
_trackTimer ??= Timer.periodic(const Duration(seconds: 120), (Timer t) {
|
||||||
var position = MyApp.currentPosition;
|
var position = MyApp.currentPosition;
|
||||||
if (position != null) {
|
if (position != null) {
|
||||||
var trackMessage = TrackPosition();
|
var trackMessage = TrackPosition();
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 312.0.0+312
|
version: 314.0.0+314
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.19.6 <3.0.0'
|
sdk: '>=2.19.6 <3.0.0'
|
||||||
|
|||||||
Reference in new issue
Block a user