Skip to content

showCupertinoSheet keep rounded corners after closing #163334

@JCKodel

Description

@JCKodel

Steps to reproduce

Show a showCupertinoSheet on iPhone SE (real or simulated) or any Android phone.

Expected results

The app should be in the state where it was before the call.

Actual results

This is the page before calling showCupertinoSheet:

Image

This is the sheet being displayed (ok):

Image

This is the page after I drag the sheet down (closing it). ** Notice how the borders are rounded ** (where it should be the same as the first screenshot). This happens on both Android and iOS.

Image

This image is from the iPhone SE simulator (iPhone SE have a square corner screen, same as some Androids, so, this bug possibly is not properly visualized in "normal" iPhones, iPads or Androids with rounded corners.

Code sample

Future<T?> showModalSheet<T>({required WidgetBuilder builder}) async {
  if (defaultTargetPlatform == TargetPlatform.iOS) {
    return await showCupertinoSheet<T>(
      context: this,
      pageBuilder: (context) => Material(child: Builder(builder: builder)),
    );
  }

  return showModalBottomSheet<T>(
    context: this,
    useSafeArea: true,
    showDragHandle: true,
    builder: builder,
  );
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.29.0, on macOS 15.1 24B83 darwin-x64, locale en-BR) [799ms]
    • Flutter version 3.29.0 on channel stable at /Users/jckodel/fvm/versions/3.29.0
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 35c388afb5 (4 days ago), 2025-02-10 12:48:41 -0800
    • Engine revision f73bfc4522
    • Dart version 3.7.0
    • DevTools version 2.42.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [2.7s]
    • Android SDK at /Users/jckodel/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [1,229ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [17ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1) [17ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.97.2) [16ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.104.0

[✓] Connected device (4 available) [6.3s]
    • Júlio’s iPhone (mobile)             • 00008030-00092DD92168C02E            • ios            • iOS 18.1.1 22B91
    • iPhone SE (3rd generation) (mobile) • 45842E71-D9F0-4938-BDCD-65FD975B282B • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-2 (simulator)
    • macOS (desktop)                     • macos                                • darwin-x64     • macOS 15.1 24B83 darwin-x64
    • Chrome (web)                        • chrome                               • web-javascript • Google Chrome 132.0.6834.160
    ! Error: Browsing on the local area network for iPad de -STUPID APPLE-. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [328ms]
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Labels

P2Important issues not at the top of the work listf: cupertinoflutter/packages/flutter/cupertino repositoryfound in release: 3.29Found to occur in 3.29found in release: 3.30Found to occur in 3.30frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-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