I’m building a Flutter iOS app that allows users to select images using the image_picker package. However, when I tap the “Gallery” button to open the native Photos picker, the UI becomes completely unresponsive.
The Photos picker appears on screen, but: • I can’t tap on any photo thumbnail • The “Cancel” button in the top-left corner doesn’t respond • I can’t scroll or dismiss the picker • The only way to recover is to stop and restart the app
Interestingly, the Flutter logs still print messages — so the app is not actually crashed, but it seems that a transparent Flutter overlay or modal barrier is blocking all touch events to the native picker.
This happens only when the picker is opened from within a Flutter dialog or modal bottom sheet. If I call the picker from a normal screen (without any dialog), it works perfectly fine.
Environment: • Flutter stable channel • image_picker: ^1.1.2 (latest) • iOS Simulator (iPhone 16 Plus, iOS 18.5) • The Photos app itself works normally outside the Flutter app
So, how can I open the iOS Photos picker safely from Flutter (even from dialogs) without losing touch input or freezing the picker UI?
*I found that someone else reported the exact same issue here: Flutter image_picker freezes on iOS 18 simulator
According to that discussion, this seems to be a bug specific to the iOS 18 simulator — the Photos picker works perfectly fine on iOS 17 simulators and real devices.
So I’m wondering if this issue still persists on the latest iOS 18 simulators, or if there’s already a workaround or plugin update that resolves it.*
I tried several approaches to fix the issue:
- Calling FocusManager.instance.primaryFocus?.unfocus() before launching the picker
- Adding short delays like await Future.delayed(Duration(milliseconds: 50))
- Waiting for WidgetsBinding.instance.endOfFrame before showing the picker
- Reinstalling the iOS simulator and cleaning Pods (flutter clean, pod install)
- Updating to the latest image_picker and image_picker_ios versions
I expected that the Photos picker would open normally and respond to touch — allowing me to tap photos or dismiss it with the Cancel button.
However, what actually happened was that the picker appeared on screen but froze: touch input didn’t work, the Cancel button didn’t respond, and I had to restart the app every time.