[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#189963RyanHolanda wants to merge 1 commit intoflutter:masterflutter/flutter:masterfrom RyanHolanda:codex/ios-display-corner-radiiRyanHolanda/flutter:codex/ios-display-corner-radiiCopy head branch name to clipboard
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
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Populates the existing
DisplayCornerRadiiviewport 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-runflutter/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)FlutterViewControllerTeston an iOS 26.5 simulator (99 tests)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-assistbot 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.