persistent issue with package imports

Integrations

Hello FlutterFlow Community and Admins,

I'm encountering a persistent issue with package imports in a custom action, and I suspect it might be related to the "Project Dependencies" section being in beta.

Context: I'm trying to create a custom action to generate a PDF document using the pdf, path_provider, and share_plus packages. All necessary dependencies have been added to the "Custom Pub Dependencies" section.

Problem Description:

  1. Code Editor Errors: When I try to compile my custom action, the code editor shows "Target of URI doesn't exist" errors for all package imports, including:

    • package:flutter/material.dart

    • package:pdf/pdf.dart

    • package:pdf/widgets.dart

    • package:path_provider/path_provider.dart

    • package:share_plus/share_plus.dart

    • Consequently, all classes and functions from these packages (e.g., BuildContext, ScaffoldMessenger, PdfPageFormat, getTemporaryDirectory, Share, XFile, SnackBar, Text) are marked as undefined.

    • I will attach screenshots showing these red underlines in the code.

  2. Dependencies Section Status: I've checked my "Project Dependencies" in App Settings, and I noticed the entire section is labeled "BETA". I've confirmed that pdf, path_provider, and share_plus are listed correctly under "Custom Pub Dependencies". Even some packages listed under "FlutterFlow Pub Dependencies" (which I assume are default) appear to be affected by similar import issues in other parts of my project, suggesting a broader problem with package resolution.

    • I will attach a screenshot of my "Project Dependencies" page.

My Question:

Is this a known issue with the current beta version of the "Project Dependencies" feature? Has anyone else experienced this, and are there any workarounds? Could this be a bug that needs to be addressed by the FlutterFlow team?

Any guidance or insights would be greatly appreciated!

Thank you,
Marie Christelbach

What have you tried so far?

Troubleshooting Steps Taken:

  • I have ensured that pdf, path_provider, and share_plus are explicitly added to the "Custom Pub Dependencies" section with the correct versions.

  • I have repeatedly clicked "Check Errors" / "Compile Custom Code" within the custom action editor to force recompilation.

  • I have attempted to run the app in "Run Mode" (web preview), where the issue persists.

  • I have also observed that even some default FlutterFlow packages listed under "FlutterFlow Pub Dependencies" (like path_provider itself) appear to be failing to import in other parts of my custom code, leading to similar "Target of URI doesn't exist" errors.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
1 reply