miguelpruivo / flutter_file_picker

File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.
MIT License
1.33k stars 658 forks source link

Bug: file explorer dialog displayed at the top of the screen on iOS mobile (web) #1509

Closed sunderee closed 4 months ago

sunderee commented 4 months ago

Describe the bug

Regardless of the browser used, on iOS the file explorer dialog gets pushed to the top of the screen, regardless of the button position. This issue is similar to #1149.

Platform

Platform OS version

How are you picking?

final result = await filePicker.pickFiles(
    allowMultiple: false,
    allowCompression: true,
    withData: true,
    type: defaultTargetPlatform == TargetPlatform.iOS
        ? FileType.media
        : FileType.custom,
    allowedExtensions: defaultTargetPlatform == TargetPlatform.iOS
        ? null
        : ['png', 'jpg', 'jpeg', 'pdf'],
);

Details to reproduce the issue

Using the pickFiles method, on any iOS web browser, the result will look like the screenshot below (certain parts of the image are intentionally censored).

WhatsApp Image 2024-05-15 at 10 38 16

Flutter Version details

Here's the copy-paste of flutter doctor -v with certain information (username, names of personal connected devices) redacted or removed.

[✓] Flutter (Channel stable, 3.22.0, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.22.0 on channel stable at /Users/XXX/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (6 days ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/XXX/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Users/XXX/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2023.3)
    • Android Studio at /Users/XXX/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.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.88.0

[✓] Connected device (4 available)
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 124.0.6367.202

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

• No issues found!

Additional context

None.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] commented 4 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

notoriouscode97 commented 3 months ago

@sunderee Hi did you manage to find a solution for this?