Skip to content

Importing a custom code file only compiles when on the custom action that imports it #7518

Description

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

I have a custom action that imports a custom code file. When I try to compile all of my functions, actions, and widgets from any other file than my custom action file, it throws an error saying that the import of my custom code file cannot be found. When I compile from that specific custom action file, it then compiles properly with no changes to the file or import statement.

Expected Behavior

The custom code, actions, functions, and widgets should compile no matter which file I execute the compilation from.

Steps to Reproduce

  1. Create a custom code file in this directory /scripts/custom (I named mine user_location_service.dart)
  2. Create a custom action in this directory /scripts/actions (I named mine startUserLocationTracking)
  3. Create a custom widget in this directory /widgets (I named mine (UserMapWidget)
  4. Have the custom action import the custom code file.
  5. Compile while in the custom action.
  6. Go to the custom widget and change something, recompile
  7. You should see an error that the custom code file can't be imported by the custom action.

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

IT4ki/LlvIV1xLQB0LX1bflKhiMUHHJ6TL07ttYbZxUjIuPtBJh/Z8zOYltoYNe5Y0NhHFeL/XoB/trWjYbXDME3EzSBfINx1KVidT3gd3q8Sq2YEKuNOEEmI5tjCh2n3J6rkQlvOsxsWk1n3VOTfNiuaC/XGZ+/Zwh9f6PHaOI=

Visual documentation

Image Image Image Image Image Image

Environment

- FlutterFlow version: 7.0.77
- Platform: Web
- Browser name and version: Chrome 153.0.8010.48
- Operating system and version affected: Windows 11 Version 25H2 (OS Build 26200.9445)

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageA potential issue that has not been confirmed as a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions