1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-26 04:48:51 +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;
});