Search code examples
flutterdartflutter-dependencies

Issue with file_picker_cross package in Flutter web


I'm facing an issue with the file_picker_cross package while working on a Flutter web project.

The error I'm encountering:

/C:/Users/ROSE%20PC/AppData/Local/Pub/Cache/hosted/pub.dev/file_picker_cross-4.6.0/lib/file_picker_cross.dart:136:14: Error: Method not found: 'NullThrownError'.
      throw (NullThrownError());
             ^^^^^^^^^^^^^^^

I have already attempted the following steps to resolve the issue, but they did not work for me:

  • Updated the file_picker_cross package to the latest version using flutter pub upgrade file_picker_cross.
  • Cleaned the project using flutter clean and reinstalled dependencies with flutter pub get.

Additional information:

  • Flutter version: [3.10.1]
  • file_picker_cross package version: [4.6.0]

Solution

  • Looking at the package page and repository, it seems abandoned and I find also people opening issues for your same problem here, the last update of the package was a year ago and so Flutter/Dart version breaking changes might simply break it as well.

    I recommend you search for alternatives or to fork and fix the problem from its repository.