Fehlerkorrekturen und Erweiterungen
This commit is contained in:
1 parent
265d75a99b
commit
47b4c85133
14 files changed
+155
-125
No files matched your search
+54
-46
@@ -17,11 +17,12 @@ void showInfosPopup(SessionStatus? status) async {
|
||||
shadowColor: Colors.transparent,
|
||||
backgroundColor: Colors.white,
|
||||
content: StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
|
||||
String getGpsStatustext() {
|
||||
Future<String> getGpsStatustext() async {
|
||||
String gpsStatus = "nicht verfügbar";
|
||||
if (MyApp.currentPosition != null) {
|
||||
var currentPosition = await MyApp.getCurrentPosition();
|
||||
if (currentPosition != null) {
|
||||
var nowUtc = DateTime.now().toUtc();
|
||||
var minutesDelta = nowUtc.difference(MyApp.currentPosition!.timestamp);
|
||||
var minutesDelta = nowUtc.difference(currentPosition.timestamp);
|
||||
|
||||
if (minutesDelta >= const Duration(minutes: 15)) {
|
||||
gpsStatus = "veraltet";
|
||||
@@ -32,51 +33,58 @@ void showInfosPopup(SessionStatus? status) async {
|
||||
return gpsStatus;
|
||||
}
|
||||
|
||||
var text = "Versionsnummer: a$version\n";
|
||||
text += "Verbindungsstatus: $connectedString\n";
|
||||
text += "GPS-Status: ${getGpsStatustext()}\n";
|
||||
text += "\n";
|
||||
text += "User Status:\n";
|
||||
if (status != null) {
|
||||
text += "cr_id: ${status.crId}\n";
|
||||
text += "cust_id: ${status.custId}\n";
|
||||
text += "sid: ${status.sid}\n";
|
||||
text += "vht_id: ${status.vhtId}\n";
|
||||
text += "server_version: ${status.serverVersion}\n";
|
||||
text += "server_instance: ${status.serverInstance}\n";
|
||||
} else {
|
||||
text += "Keine Informationen gefunden";
|
||||
}
|
||||
return FutureBuilder<String>(
|
||||
future: getGpsStatustext(),
|
||||
builder: (context, snapshot) {
|
||||
String gpsStatus = snapshot.data ?? "wird geladen...";
|
||||
|
||||
var text = "Versionsnummer: a$version\n";
|
||||
text += "Verbindungsstatus: $connectedString\n";
|
||||
text += "GPS-Status: $gpsStatus\n";
|
||||
text += "\n";
|
||||
text += "User Status:\n";
|
||||
if (status != null) {
|
||||
text += "cr_id: ${status.crId}\n";
|
||||
text += "cust_id: ${status.custId}\n";
|
||||
text += "sid: ${status.sid}\n";
|
||||
text += "vht_id: ${status.vhtId}\n";
|
||||
text += "server_version: ${status.serverVersion}\n";
|
||||
text += "server_instance: ${status.serverInstance}\n";
|
||||
} else {
|
||||
text += "Keine Informationen gefunden";
|
||||
}
|
||||
|
||||
return SizedBox(
|
||||
key: GlobalKey(),
|
||||
height: 350,
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Container(
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
color: Colors.grey,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(child: Text(text, textAlign: TextAlign.left)),
|
||||
getDefaultButton(
|
||||
'OK',
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
return SizedBox(
|
||||
key: GlobalKey(),
|
||||
height: 350,
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Container(
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
color: Colors.grey,
|
||||
width: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(child: Text(text, textAlign: TextAlign.left)),
|
||||
getDefaultButton(
|
||||
'OK',
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
},
|
||||
);
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user