Skip to content

CupertinoSheetRoute top gap can reveal lower routes when multiple sheets are stacked #187057

Closed
flutter/packages
#12530

Description

@huahua8893

Steps to reproduce

  1. Create a set of pages, using a distinct color for the home page, such as blue.
  2. Use showCupertinoSheet for routing between pages.
  3. When routing to the 3rd-level page, observe the top area of the screen to check if the home page is exposed.

Expected results

The home page remains hidden.

Actual results

The blue color of the home page is clearly visible, and the display state of the 2nd-level page is incorrect.

Code sample

Code sample
import 'package:flutter/cupertino.dart';

void main() {
  runApp(const SystemCupertinoSheetDemoApp());
}

class SystemCupertinoSheetDemoApp extends StatelessWidget {
  const SystemCupertinoSheetDemoApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const CupertinoApp(
      home: _DemoHomePage(),
    );
  }
}

class _DemoHomePage extends StatelessWidget {
  const _DemoHomePage();

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      child: ColoredBox(
        color: const Color(0xff006edb),
        child: Center(
          child: CupertinoButton.filled(
            onPressed: () => _showSystemSheet(context, level: 2),
            child: const Text('Open Sheet 2'),
          ),
        ),
      ),
    );
  }
}

void _showSystemSheet(BuildContext context, {required int level}) {
  showCupertinoSheet<void>(
    context: context,
    scrollableBuilder:
        (BuildContext context, ScrollController scrollController) {
          return _SystemSheetPage(level: level);
        },
  );
}

class _SystemSheetPage extends StatelessWidget {
  const _SystemSheetPage({required this.level});

  final int level;

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      child: Center(
        child: CupertinoButton.filled(
          onPressed: level >= 4
              ? () => Navigator.of(context, rootNavigator: true).pop()
              : () => _showSystemSheet(context, level: level + 1),
          child: Text(level >= 4 ? 'Close Sheet 4' : 'Open Sheet ${level + 1}'),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
2026-05-25.22.32.33.mov

Logs

--

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.44.0, on macOS 26.5 25F71 darwin-arm64, locale
    zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.5)
[✓] Chrome - develop for the web
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!

Activity

  1. added
    in triagePresently being triaged by the triage team
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: cupertino_uicupertino_ui package in flutter/packages
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-designOwned by Design Languages team
    and removed
    in triagePresently being triaged by the triage team
    on May 26, 2026
  2. mbcorona commented on May 26, 2026

    @mbcorona
    Member

    HI @huahua8893 , thanks for the detailed report, including code sample and video evidence. Routing to team-design to evaluate, note PR linked#187058

  3. added
    a: fidelityMatching the OEM platforms better
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Jun 3, 2026
  4. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 18, 2026
  5. added a commit that references this issue on Aug 25, 2026
    4fc3e81
  6. added a commit that references this issue on Aug 27, 2026
    c2a9dcf
  7. added a commit that references this issue on Sep 2, 2026
    aa9a4d5
  8. github-actions commented on Sep 8, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: fidelityMatching the OEM platforms betterhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cupertino_uicupertino_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions