iosflutteripadoverlay

Flutter overlays (Dialog, BottomSheet, ..etc) close immediately after opening on iPadOS 26.1


Flutter dialog or drawer closes immediately on iPadOS 26.1 (Flutter 3.35.x)

When launch a flutter app on an iPad device or simulator running iPadOS 26.1 (you can get the latest simulators by updating Xcode to v26.1), the issue occurs:

  1. Tap the hamburger icon to open the end drawer (or show a dialog/bottom sheet).
  2. It closes immediately — like blinking — as if the barrier was tapped.
  3. Occasionally, it behaves correctly and stays open.

This only happens when barrierDismissible is true. It works fine on iPhones or older iPadOS versions.

Is this a known issue or is there a workaround?


Solution

  • This is a known issue in Flutter — see the GitHub issue here:
    🔗 flutter/flutter#177992

    It happens on iPadOS 26.1 when showing a dialog, bottom sheet, or end drawer with barrierDismissible: true.

    ✅ Temporary workaround:

    You can manually control the outside-tap behavior using a TapRegion and ignore taps that happen too quickly after opening the dialog.

    Here’s the workaround from the Flutter GitHub issue comments:
    🔗 flutter/flutter#177992 (comment)

    final now = DateTime.now();
    return showDialog<void>(
      context: context,
      barrierDismissible: false,
      builder: (BuildContext context) {
        return TapRegion(
          onTapOutside: (_) {
            // Workaround for https://github.com/flutter/flutter/issues/177992
            if (DateTime.now().difference(now) < Duration(milliseconds: 500)) {
              return;
            }
            if (Navigator.canPop(context)) {
              Navigator.pop(context);
            }
          },
          child: ... // your dialog content
        );
      },
    );
    

    This prevents the dialog or drawer from closing immediately due to an unintended outside tap event on iPadOS 26.1.