Skip to content

Custom Function not saving — "function is empty or cannot be parsed" error / Save button stuck #7281

Description

@javiredmar

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

Custom Functions fail to save. The Save button appears disabled even after making real edits to the code. Pressing Ctrl+S shows a "saved successfully" toast, but the function never persists — it does not appear in the Custom Functions list/counter after saving, reopening the page, or hard-refreshing. When forcing a trivial change to re-enable the Save button, saving throws: "The function is empty or cannot be parsed. Make sure not to modify code outside of the designated area." When attempting to replace only the code inside the editable zone (between the MODIFY CODE markers), the editor duplicated the entire block instead of cleanly replacing the selection, resulting in a malformed file with two sets of imports, two function signatures, and two closing markers.

Expected Behavior

The Custom Function should save successfully and appear in the Custom Functions list/counter, without duplicating code or throwing a parse error, given that the code is valid Dart and was placed strictly within the designated editable zone.

Steps to Reproduce

  1. Open Custom Code > Custom Functions.
  2. Create a new Custom Function.
  3. Set Return Value: Type = Supabase Row (select any table), Is List = true.
  4. Add 4 arguments: one Supabase Row (Is List = true), one Integer (Nullable), two Strings (Nullable).
  5. In the editable code zone (between "/// MODIFY CODE ONLY BELOW THIS LINE" and "/// MODIFY CODE ONLY ABOVE THIS LINE"), paste a valid Dart function body that filters and returns the list.
  6. Click Save.
  7. Observe: Save button may be disabled, or Ctrl+S shows "saved" but the function does not appear in the Custom Functions counter/list.
  8. Add a trivial comment inside the editable zone to re-enable Save, click Save again.
  9. Observe error: "The function is empty or cannot be parsed. Make sure not to modify code outside of the designated area."

Reproducible from Blank

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

Bug Report Code (Required)

IT5Ti/Hl7ZdgobRd7qXyKfpagioUJj82U4IZkuwacwEbNuvnPIYXduPBMnFJX+GrT2xcHmKZnjgIptLQv/zlVsYBH0mIQ757/8xcEDnwRkKmWpStDbuCX0FRI/NhClCc55qOihZ+PsZtWk482E66JNisaCvfJpu2DTEvQcr+CIH5onylKwzNVThQtmNecCfn

Visual documentation

Image Image Image

Environment

- FlutterFlow version: 7.0.23
- Platform: Desktop App (Windows)
- Browser name and version (web): N/A - Desktop App
- Operating system and version (desktop): Windows 11 Home 25H2

Additional Information

This is blocking development of a required Custom Function (filtrarChollosGrid) needed to locally filter and paginate a large Supabase dataset (439+ rows) inside a GridView. Without it, the GridView renders all rows at once, causing performance/memory issues on device. This has blocked progress on the project for two consecutive days.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions