miguelpruivo/flutter_file_picker

Make zenity, kdialog, qarma as a dependency

Closed this issue · 4 comments

Similar Issue: #1270

Describe the bug
Since the dependency for zenity, kdialog, qarma is not mentioned anywhere in the package. Would it be fine to add libraries as a dependency or a mention that this package depends on the above one.

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
What version did it happen?
Ubuntu 20, Ubuntu 22

How are you picking?

 var result = await FilePicker.platform.pickFiles(
        type: FileType.custom,
        allowedExtensions: ["xml"],
      );

Details to reproduce the issue

Error Log

  1. Install on an Ubuntu 22 machine which does not have zenity installed. Launch the app and try to import a profile. The import button does nothing, and no error message is reported to the user.

If you launch the app from the command line, you will see these logs:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Couldn't find the executable zenity in the path.
#0 isExecutableOnPath (package:file_picker/src/utils.dart:60)

#1 FilePickerLinux._getPathToExecutable (package:file_picker/src/linux/file_picker_linux.dart:120)

#2 FilePickerLinux.pickFiles (package:file_picker/src/linux/file_picker_linux.dart:23)

#3 Utilities.importProfile (package:/utils.dart:74)

#4 _ImportProfile.build. (package:/import.dart:31)

2. Install "zenity" using apt. "sudo apt install -y zenity". Now the import functionality works as expected.

Linux has been standardizing some features recently and there's a File Chooser XDG Portal which can be used with native integration with the user system as well as working very well inside sandboxes (since they were created to work in them).
Should we use XDG portal internally?

Expected Behavior:
User should not be expected to identify and install dependencies.

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

@sunnykarira-ms since I'm not the main maintainer of Desktop side and it's typically @philenius, what would you suggest to add to the docs in order to fix this? I'm all hears, let me know.

Thanks!

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

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