❌ Basic Imports Causing Compilation Error

Custom Code

Hi FlutterFlow Community,

I'm encountering an issue with my custom widget code in FlutterFlow where the boilerplate imports seem to be unavailable, causing compilation errors.

Here’s a summary of the problem:

"Target of URI doesn't exist: '/backend/backend.dart’. Try creating the file referenced by the URI, or try using a URI for a file that does exist.
Target of URI doesn't exist: ‘/actions/actions.dart’. Try creating the file referenced by the URI, or try using a URI for a file that does exist.
Target of URI doesn't exist: ‘/flutter_flow/flutter_flow_theme.dart'. Try creating the file referenced by the URI, or try using a URI for a file that does exist.
Target of URI doesn't exist: ‘/flutter_flow/flutter_flow_util.dart'. Try creating the file referenced by the URI, or try using a URI for a file that does exist.
Target of URI doesn't exist: ‘/flutter_flow/custom_functions.dart’. Try creating the file referenced by the URI, or try using a URI for a file that does exist."

The error happens only with these imports:

  • with backend.dart, actions.dart, flutter_flow_theme.dart, flutter_flow_util.dart, custom_functions.dart

Any guidance or suggestions on how to properly handle these automatic imports? I am stuck! 🙏

What have you tried so far?

I tried adding the imports as pubspec dependencies through the UI. For example:

I tried testing withuot compiling but the widget causes a crashing error that does not allow me to proceed with the test.

I tried removing the lines, but FlutterFlow automatically adds the following import lines.

Did you check FlutterFlow's Documentation for this topic?
Yes
4
4 replies