Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[iOS] Populate display corner radii on iOS 26#189963

Open
RyanHolanda wants to merge 1 commit into
flutter:masterflutter/flutter:masterfrom
RyanHolanda:codex/ios-display-corner-radiiRyanHolanda/flutter:codex/ios-display-corner-radiiCopy head branch name to clipboard
Open

[iOS] Populate display corner radii on iOS 26#189963
RyanHolanda wants to merge 1 commit into
flutter:masterflutter/flutter:masterfrom
RyanHolanda:codex/ios-display-corner-radiiRyanHolanda/flutter:codex/ios-display-corner-radiiCopy head branch name to clipboard

Conversation

@RyanHolanda

Copy link
Copy Markdown

Populates the existing DisplayCornerRadii viewport metric on iOS 26 and later. A transparent, non-interactive, window-sized UIKit probe uses a container-concentric corner configuration to obtain each effective display corner radius, converts the values from logical points to physical pixels, and refreshes them after layout and UIKit property updates. The metric remains unset when the view controller is detached from a window or on earlier iOS versions.

Fixes #189746.

Validation:

  • flutter/bin/et format --dry-run
  • flutter/bin/et lint
  • ./bin/flutter analyze packages/flutter/lib/src/widgets/media_query.dart
  • ./bin/flutter test packages/flutter/test/widgets/media_query_test.dart (86 tests)
  • FlutterViewControllerTest on an iOS 26.5 simulator (99 tests)
  • Actual UIKit probe coverage on iPhone 11 and iPad Pro 13-inch iOS 26.5 simulators
  • Physical iPhone on iOS 26.5.2 at 390×844 @3x (all four corners reported approximately 47.33 logical pixels / 141.99 physical pixels)

No changes were required in the flutter/tests repository.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@RyanHolanda
RyanHolanda requested a review from a team as a code owner July 24, 2026 02:49
@github-actions github-actions Bot added platform-ios iOS applications specifically framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels Jul 24, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request attempts to add support for retrieving display corner radii on iOS by implementing a transparent probe view in FlutterViewController and updating viewport metrics. However, the implementation contains several critical issues: it references a non-existent iOS version (iOS 26.0), uses invalid or non-public UIKit APIs, and calls [super updateProperties] which will cause compile-time errors. Additionally, the accompanying unit tests are gated behind an unavailable iOS version check, rendering them dead code on current test environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. framework flutter/packages/flutter repository. See also f: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: iOS populate displayCornerRadii using the public iOS 26 concentric-corner APIs.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.