Skip to content

Persistent Custom Code Compilation Error: FFAppState / flutter_flow_util.dart not found #5948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
Bob-31-flow opened this issue Jun 6, 2025 · 2 comments
Open
1 of 2 tasks
Assignees
Labels
status: not a bug This is not a bug.

Comments

@Bob-31-flow
Copy link

Bob-31-flow commented Jun 6, 2025

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 am experiencing a recurring and persistent custom code compilation error in my project (OGSnakeGame). The error occurs specifically in my 'drawGameBoard' custom action. Despite numerous troubleshooting attempts, the error returns immediately or shortly after being cleared. I am using the FlutterFlow Desktop Application.

Expected Behavior

The 'drawGameBoard' custom action should compile without errors, and the 'Issues' panel should show 0 errors. The app should then be able to run in Test Mode, displaying the game board with the snake and food.

Steps to Reproduce

Open my project https://app.flutterflow.io/project/o-g-snake-game-1n6g59?tab=widgetTree&page=OGSnakeGame Maps to the 'Custom Code' section. Select the 'drawGameBoard' custom action. Observe red highlights on 'import 'package:flutter_flow/flutter_flow_util.dart';' and usage of 'FFAppState()'. Observe the 'Issues' panel showing 'Errors found in custom action 'drawGameBoard''. Attempts to resolve (re-saving, app restarts, deleting/recreating custom action, re-adding to page actions) provide temporary or no relief.

Reproducible from Blank

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

Bug Report Code (Required)

IT4wiefl6otPxLhY1c/tbfkwiiQvIjo3a78njMF9Sis8Gr7nP4kUWMzBUBFUOemlTVZYJk2JvDsX/MnIvfOXG/crFEiYbqpnzKlqTw6VTj2gR5SPC5S3b0B8DexYfVfH5KTUviYnNtthWVo91F2EAeeREzbDQoTFCkUBR+aeXdeK2SrDX1iXc2URm05KZDPz

Visual documentation

Image

Image

Image

Environment

- FlutterFlow version: Version 5.5.3 (5.5.3)
- Platform: macOS Desktop Application
- Browser name and version: N/A (Using Desktop App)
- Operating system and version affected: MacOS 13.3 (22E252)

Additional Information

This issue is critically affecting my ability to build and test my game. The 'drawGameBoard' action is fundamental to rendering the game's visuals (snake and food). Without it compiling, I cannot effectively develop or test my game. My goal is to create a fully functional snake game in FlutterFlow.

@Bob-31-flow Bob-31-flow added the status: needs triage A potential issue that has not been confirmed as a bug. label Jun 6, 2025
@Alezanello Alezanello self-assigned this Jun 9, 2025
Copy link
Collaborator

Hello!

It looks like there’s a duplicate import of the same .dart file. FlutterFlow automatically adds the import at the top, and it’s being imported again manually below—without using the full path. This can lead to conflicts.

Also, the issue you're seeing with FFAppState is likely because there are no FFAppState variables defined in your project. Please make sure everything is set up correctly in the App State section.

image.png

@Alezanello Alezanello removed the status: needs triage A potential issue that has not been confirmed as a bug. label Jun 9, 2025
@Alezanello Alezanello added the status: not a bug This is not a bug. label Jun 9, 2025 — with Linear
@Bob-31-flow
Copy link
Author

Hello,
Issue still the same
I am experiencing this exact persistent compilation error. Even after trying to regenerate code and clearing caches, the "Target of URI doesn't exist" error for 'package:flutter_flow/flutter_flow_util.dart' (and other core Flutter/FlutterFlow imports like material.dart) is present in all my custom actions.

I confirmed this by creating a brand new, minimal custom action (testImportIssue), which also shows these import errors.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: not a bug This is not a bug.
Projects
None yet
Development

No branches or pull requests

2 participants