[image_picker] Update for UIScene compatibility#10677
Merged
auto-submit[bot] merged 4 commits intoflutter:mainfrom Jan 6, 2026
Merged
[image_picker] Update for UIScene compatibility#10677auto-submit[bot] merged 4 commits intoflutter:mainfrom
auto-submit[bot] merged 4 commits intoflutter:mainfrom
Conversation
Replaces the code that used the key window's root view controller with a call to the new registrar viewController method to get the actual Flutter content's view controller. Introduces the same protocol abstraction now used in a number of our plugins, so that a stub can be injected without having to mock (which would be a barrier to Swift migration) or fake (which is fragile since it would have to be complete, and methods can be added over time) the entire Flutter plugin registrar. Fixes flutter/flutter#174418
There was a problem hiding this comment.
Code Review
This pull request refactors the image_picker_ios plugin to improve UIScene compatibility by abstracting view controller access behind a FIPViewProvider protocol. This is a solid approach that also improves testability. The changes are mostly correct, but I've found a critical issue where many tests were not updated to use the new initializer, potentially masking issues and reducing test effectiveness. I've also included a couple of minor suggestions for improving code style and robustness.
...picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin.m
Show resolved
Hide resolved
packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.m
Show resolved
Hide resolved
...mage_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FIPViewProvider.m
Show resolved
Hide resolved
vashworth
approved these changes
Jan 6, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 7, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 7, 2026
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jan 7, 2026
flutter/packages@d3f860d...9705815 2026-01-07 [email protected] [ci] setup flutter in batch release workflow (flutter/packages#10735) 2026-01-07 [email protected] [mustache_template] Improve error throwing (flutter/packages#10700) 2026-01-06 [email protected] [ci] Adjust workflow for dispatching go_router batch release (flutter/packages#10733) 2026-01-06 [email protected] [rfw] Remove scripting language integration section from `README` (flutter/packages#10726) 2026-01-06 [email protected] [image_picker] Update for UIScene compatibility (flutter/packages#10677) 2026-01-06 [email protected] [google_maps_flutter] Add iOS SDK 10.x support (flutter/packages#10720) 2026-01-06 [email protected] Update Google Fonts to v7.0.0 with new and removed fonts (flutter/packages#10713) 2026-01-06 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump the kotlin-gradle-plugin group across 7 directories with 1 update (flutter/packages#10661) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jan 7, 2026
flutter/packages@d3f860d...9705815 2026-01-07 [email protected] [ci] setup flutter in batch release workflow (flutter/packages#10735) 2026-01-07 [email protected] [mustache_template] Improve error throwing (flutter/packages#10700) 2026-01-06 [email protected] [ci] Adjust workflow for dispatching go_router batch release (flutter/packages#10733) 2026-01-06 [email protected] [rfw] Remove scripting language integration section from `README` (flutter/packages#10726) 2026-01-06 [email protected] [image_picker] Update for UIScene compatibility (flutter/packages#10677) 2026-01-06 [email protected] [google_maps_flutter] Add iOS SDK 10.x support (flutter/packages#10720) 2026-01-06 [email protected] Update Google Fonts to v7.0.0 with new and removed fonts (flutter/packages#10713) 2026-01-06 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump the kotlin-gradle-plugin group across 7 directories with 1 update (flutter/packages#10661) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
ivan-vanyusho
pushed a commit
to ivan-vanyusho/packages
that referenced
this pull request
Jan 26, 2026
Replaces the code that used the key window's root view controller with a call to the new registrar viewController method to get the actual Flutter content's view controller. Introduces the same protocol abstraction now used in a number of our plugins, so that a stub can be injected without having to mock (which would be a barrier to Swift migration) or fake (which is fragile since it would have to be complete, and methods can be added over time) the entire Flutter plugin registrar. Fixes flutter/flutter#174418 ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
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.
Replaces the code that used the key window's root view controller with a call to the new registrar viewController method to get the actual Flutter content's view controller.
Introduces the same protocol abstraction now used in a number of our plugins, so that a stub can be injected without having to mock (which would be a barrier to Swift migration) or fake (which is fragile since it would have to be complete, and methods can be added over time) the entire Flutter plugin registrar.
Fixes flutter/flutter#174418
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3