From 5257d89b534b14c74d705cd51d53fa4d1c3c975b Mon Sep 17 00:00:00 2001 From: The one with the braid Date: Thu, 28 Mar 2024 02:02:30 +0100 Subject: [PATCH] fix: never use root navigator for bottom sheets Signed-off-by: The one with the braid --- lib/utils/adaptive_bottom_sheet.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/adaptive_bottom_sheet.dart b/lib/utils/adaptive_bottom_sheet.dart index d2a9a8b6..cfe487ff 100644 --- a/lib/utils/adaptive_bottom_sheet.dart +++ b/lib/utils/adaptive_bottom_sheet.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/themes.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; Future showAdaptiveBottomSheet({ required BuildContext context, @@ -14,7 +13,8 @@ Future showAdaptiveBottomSheet({ showModalBottomSheet( context: context, builder: builder, - useRootNavigator: !PlatformInfos.isMobile, + // this sadly is ugly on desktops but otherwise breaks `.of(context)` calls + useRootNavigator: false, isDismissible: isDismissible, isScrollControlled: isScrollControlled, constraints: BoxConstraints(