mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 13:05:11 +00:00
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:
commit
a06bd7e093
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:fluffychat/config/app_config.dart';
|
import 'package:fluffychat/config/app_config.dart';
|
||||||
import 'package:fluffychat/config/themes.dart';
|
import 'package:fluffychat/config/themes.dart';
|
||||||
import 'package:fluffychat/utils/platform_infos.dart';
|
|
||||||
|
|
||||||
Future<T?> showAdaptiveBottomSheet<T>({
|
Future<T?> showAdaptiveBottomSheet<T>({
|
||||||
required BuildContext context,
|
required BuildContext context,
|
||||||
|
@ -14,7 +13,8 @@ Future<T?> showAdaptiveBottomSheet<T>({
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
builder: builder,
|
builder: builder,
|
||||||
useRootNavigator: !PlatformInfos.isMobile,
|
// this sadly is ugly on desktops but otherwise breaks `.of(context)` calls
|
||||||
|
useRootNavigator: false,
|
||||||
isDismissible: isDismissible,
|
isDismissible: isDismissible,
|
||||||
isScrollControlled: isScrollControlled,
|
isScrollControlled: isScrollControlled,
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
|
|
Loading…
Reference in a new issue