1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-26 06:49:22 +00:00

Pop routes when WebSocket connection is interrupted

This commit is contained in:
Pierre HUBERT 2020-05-01 09:17:08 +02:00
parent 20ea964337
commit 02e60ad87c

View File

@ -62,6 +62,10 @@ class _InitializeWidgetState extends SafeState<InitializeWidget> {
print("Could not connect to server! $e");
print(stack);
// Pop until we reach main route
Navigator.of(context)
.popUntil((settings) => ModalRoute.of(context).isCurrent);
setState(() {
_error = true;
});