-
Notifications
You must be signed in to change notification settings - Fork 28
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
Whenever I try to compile custom action code in FlutterFlow, it does NOT work and also does not state what the code specific errors are. I get the following (general) error:
Unknown error compiling custom code. A common cause is a custom widget or action whose name in the code does not match the name provided in the editor.
Here is my code:
`// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
Future getFirstString(String text) async {
// split string by empty spaces and get first string
List words = text.split(" ");
if (words.isNotEmpty) {
return words[0];
} else {
return "";
}
}`
When pressing the Red Cross button, I get an empty list of code errors:
Expected Behavior
- Create custom action.
- Write and save custom code.
- Compile with no errors (or if there are errors, provide me with a list of actual code errors).
Steps to Reproduce
- Open custom code editor section.
- Select "+ Add" button and select "Action".
- Write custom code and set name, return value and parameters.
- Save custom action.
- Compile custom action.
Reproducible from Blank
- The steps to reproduce above start from a blank project.
Bug Report Code (Required)
IT48i87huJVNrsda1rrtbfpVniQUJj47bb8s1upuVUo8J5zKB+wAYvf7P1FWTL3id29AJU38knIz/Pfqv/DLE/oDAy6BG4c7yJNTFwrKWkGlVYTRO5GzfW1fJ+dRFVSj08OFqiUkLuhpZU4R3GaMe9yAfA/qK5jIDUcNLv21KdeK2SrDX1iXc2URm05KZDPz
Visual documentation
screen-recording-2024-09-28-at-171811_avMHvOwa.mp4
Environment
- FlutterFlow version: 5.0.1
- Platform: macOS Sequoia 15.0
- Browser name and version: FlutterFlow desktop app for macOS
- Operating system and version affected: macOS Sequoia 15.0
Additional Information
I am unable to compile any custom action code, it doesn't matter how simple or complex the code is, nothing complies.