fix: Dialog using wrong Navigator

This commit is contained in:
Christian Pauly 2021-02-24 12:17:23 +01:00
commit 1a167bebe7
30 changed files with 240 additions and 193 deletions

View file

@ -10,7 +10,7 @@ extension LocalizedBody on Event {
void openFile(BuildContext context, {bool downloadOnly = false}) async {
if (!downloadOnly &&
[MessageTypes.Image, MessageTypes.Sticker].contains(messageType)) {
await Navigator.of(context).push(
await Navigator.of(context, rootNavigator: false).push(
MaterialPageRoute(builder: (_) => ImageView(this)),
);
return;

View file

@ -43,6 +43,7 @@ abstract class PlatformInfos {
var version = await PlatformInfos.getVersion();
showAboutDialog(
context: context,
useRootNavigator: false,
children: [
Text('Version: $version'),
RaisedButton(

View file

@ -73,6 +73,7 @@ class UrlLauncher {
if (await showOkCancelAlertDialog(
context: context,
title: 'Join room $roomIdOrAlias',
useRootNavigator: false,
) ==
OkCancelResult.ok) {
roomId = roomIdOrAlias;
@ -116,6 +117,7 @@ class UrlLauncher {
if (await showOkCancelAlertDialog(
context: context,
title: 'Message user ${user.id}',
useRootNavigator: false,
) ==
OkCancelResult.ok) {
roomId = (await showFutureLoadingDialog(