Erweiterungen

This commit is contained in:
Sven committed 2024-07-03 12:47:49 +02:00
1 parent fbdd2a4338
commit 41d086e13e
7 files changed
+244 -185

No files matched your search

+9 -6
View File
@@ -327,20 +327,23 @@ class _MainPageState extends State<MainPage> {
}
}
showLogoutAlertDialog(BuildContext context) {
showLogoutAlertDialog(BuildContext context) async {
Widget yesButton = TextButton(
child: const Text("Ja"),
onPressed: () {
Navigator.of(context).pop();
_sendLogoutMessage();
Future.delayed(const Duration(seconds: 1), () async {
MessageService().publish<DisconnectClientMessage>(Constants.messageTopicDisconnectClient, arguments: DisconnectClientMessage());
});
showMessageDialog(context, "Information", "Sie werden abgemeldet.\nBitte warten...");
_sendLogoutMessage();
_loggedOut = true;
setState(() {});
Future.delayed(const Duration(seconds: 5), () async {
Navigator.of(context).pop();
setState(() {});
});
},
);