Merge pull request #956 from krille-chan/braid/adaptive-bottom-sheet-navigator

fix: never use root navigator for bottom sheets
This commit is contained in:
Krille-chan 2024-03-29 09:27:10 +01:00 committed by GitHub
commit a06bd7e093
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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(