fix: never use root navigator for bottom sheets

Signed-off-by: The one with the braid <info@braid.business>
This commit is contained in:
The one with the braid 2024-03-28 02:02:30 +01:00
parent 6e13c17682
commit 5257d89b53

View file

@ -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<T?> showAdaptiveBottomSheet<T>({
required BuildContext context,
@ -14,7 +13,8 @@ Future<T?> showAdaptiveBottomSheet<T>({
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(