Skip to content

Deleting/Updating existing enum values causes custom functions to no longer compile correctly. #3212

@wwchiang

Description

@wwchiang

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

After trying to update an existing enum set, all custom function code no longer compiles correctly, and always errors and prevents the project from being tested/launched.

Expected Behavior

Changing the enums through the FlutterFlow UI should not lock my app into any state where it no longer compiles.

Steps to Reproduce

  1. Take any widget which has a custom function attached to it, and the custom function utilizes an enum (either to check a string value, deserialize a matching enum, etc)
  2. Update the enum in an "unexpected" way (eg, by deleting rows, moving them around, saving blank rows, etc. Basically, not the "happy path".)
  3. Attempt to compile the custom function code.

Reproducible from Blank

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

Bug Report Code (Required)

IT4oi87huI11obhJ1a6JbvpVuyQXC0M3R5Ir18pBazwbfe+uB4kqevfOTERpTcPjYHN+J2ej8GoW0snHkfD+V/U5GxCCR65d+btqbgqWcFK6Wq6IFJWgXkYmI59MIXLD0Luk2xJQWLJpWXtm3VyqBeSvcBPdNZD7CzAeDq/LZO4=

Visual documentation

This was my enum prior to updating:

Screenshot 2024-06-24 175530

And this was my enum afterwards:

Screenshot 2024-06-24 175405

When updating, I had deleted some of the existing enums in the UI using the trash can icon, before adding in new ones. Visually, nothing appeared to be wrong, but I began to run into code compilation problems.
Issue 1: The enum which was updated was no longer able to be located in the codebase, despite being visible from the UI.

Screenshot 2024-06-24 175354

Issue 2: Other enums were also affected, and the deserializeEnum was also unable to be located.

The workaround I found was to revert to an earlier version where I had not altered the enums, and this time I specifically made sure not to delete any existing values. only modifying existing ones or adding new ones.

Screenshot 2024-06-24 180139

Environment

- FlutterFlow version: 4.1.61+
- Platform: Windows Desktop
- Browser name and version:
- Operating system and version affected: Windows 10 Home

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions