Erweiterungen
This commit is contained in:
1 parent
8a43d097dc
commit
f89ca690c8
4 files changed
+47
-21
No files matched your search
@@ -1,9 +1,11 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:shared_map/shared_map.dart';
|
||||
import 'package:stadtbote/messages/pop_content_view_message.dart';
|
||||
import 'package:stadtbote/model/enqueued_message.dart';
|
||||
@@ -46,6 +48,8 @@ Future<void> main() async {
|
||||
PictureSchema
|
||||
], directory: dir.path, name: "database_v1");
|
||||
|
||||
var status = await Permission.storage.request();
|
||||
|
||||
await _clearLog();
|
||||
|
||||
runApp(const MyApp());
|
||||
|
||||
@@ -88,8 +88,10 @@ class MqttCore {
|
||||
|
||||
_cancelTrackTimer();
|
||||
|
||||
if (_mqttClient != null && _mqttClient!.connectionStatus == ConnectionStateEnum.connected) {
|
||||
if (_mqttClient != null) {
|
||||
_mqttClient!.disconnect();
|
||||
|
||||
_mqttClient = null;
|
||||
}
|
||||
|
||||
connectionState = ConnectionStateEnum.notConnected;
|
||||
@@ -459,6 +461,8 @@ class MqttCore {
|
||||
var brokerUriAndPortArray = bootstrapResponsePayload.broker.replaceFirst("mqtt://", "").split(":");
|
||||
_brokerUri = brokerUriAndPortArray[0];
|
||||
_brokerPort = int.parse(brokerUriAndPortArray[1]);
|
||||
//_brokerUri = "192.168.180.27";
|
||||
//_brokerPort = 1883;
|
||||
_clientId = bootstrapResponsePayload.id;
|
||||
_fromServerTopic = bootstrapResponsePayload.fromServer;
|
||||
_toServerTopic = bootstrapResponsePayload.toServer;
|
||||
|
||||
Reference in new issue
Block a user