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:
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.
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
, andshare_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