Skip to content
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

FlutterFlow Strips Leading Underscore from Supabase Field Names, Causing Naming Conflicts - "_" #5482

Open
1 of 2 tasks
dmslabsbr opened this issue Feb 26, 2025 · 2 comments
Assignees
Labels
status: needs triage A potential issue that has not been confirmed as a bug.

Comments

@dmslabsbr
Copy link

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

When I use a Supabase field name that begins with an underscore (for example, _idKrAtualizacao), FlutterFlow removes the underscore when converting the field name to a variable, resulting in the variable name idKrAtualizacao. My table also contains a field named idKrAtualizacao, which is also converted to idKrAtualizacao.

This leads to a naming conflict that causes a compile error. Although the error is not shown in the FlutterFlow interface, it becomes apparent when I download the code and run the command flutter build web.

Expected Behavior

The field names should either preserve the leading underscore (e.g. _idKrAtualizacao) or provide a mechanism to differentiate between the two fields to avoid naming conflicts.

Steps to Reproduce

In Supabase, create a table with two fields:
One field named _idKrAtualizacao
Another field named idKrAtualizacao
Integrate this table into your FlutterFlow project.
Notice that when mapping field names, both are converted to idKrAtualizacao.
Download the project code and run flutter build web to see the compile error.

Reproducible from Blank

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

Bug Report Code (Required)

ITEeiPGAzItPj71H+pPqaMFKrwMwJ0QlUIInj+0bWRMhfbnpO5kqec7SQBdLYtTjS3w3emaamkQHwtaJvvDhDsY5Hw6dfYBezq5XQQ3dcGC6VL6pPKiSSWhBM55hGW2O1p6vgiR/AM1vWUIR6k+IIfCrG3qCf9qOYwx5e6fDbOY=

Visual documentation

Image

Image

Target dart2js failed: ProcessException: Process exited abnormally with exit code 1: lib/backend/supabase/database/tables/vw_kr_checkin.dart:26:12: Error: 'idKrAtualizacao' is already declared in this scope. int? get idKrAtualizacao => getField<int>('_idKrAtualizacao'); ^^^^^^^^^^^^^^^ lib/backend/supabase/database/tables/vw_kr_checkin.dart:20:12: Info: Previous declaration of 'idKrAtualizacao'. int? get idKrAtualizacao => getField<int>('idKrAtualizacao'); ^^^^^^^^^^^^^^^ lib/backend/supabase/database/tables/vw_kr_checkin.dart:27:7: Error: 'idKrAtualizacao' is already declared in this scope. set idKrAtualizacao(int? value) => setField<int>('_idKrAtualizacao', value); ^^^^^^^^^^^^^^^ lib/backend/supabase/database/tables/vw_kr_checkin.dart:21:7: Info: Previous declaration of 'idKrAtualizacao'. set idKrAtualizacao(int? value) => setField<int>('idKrAtualizacao', value); ^^^^^^^^^^^^^^^

Environment

- FlutterFlow version:  v5.2.4 released February 26, 2025 - Flutter version is 3.27.3
- Platform: WEB
- Browser name and version: Chrome 133.0.6943.98
- Operating system and version affected:  Windows 10

Additional Information

No response

@dmslabsbr dmslabsbr added the status: needs triage A potential issue that has not been confirmed as a bug. label Feb 26, 2025
Copy link

Hi,

I'm sorry to hear that you're experiencing this issue.

I’ve tried to replicate the error, and I can confirm that it is indeed occurring.

For now, to ensure you can continue working on your project, I recommend avoiding the use of underscores (_) in the names you assign in your database.

I will continue to follow up on this case and keep you updated as soon as we have a solution.

Best regards

@rzambroni rzambroni assigned rzambroni and Alezanello and unassigned rzambroni Feb 27, 2025
Copy link

Hi,

I’ve been following up on your case.

What you're experiencing is expected behavior due to FlutterFlow's naming convention, which you can find more information about here: https://docs.flutterflow.io/resources/style-guide .

I recommend using camelCase or another method to differentiate your columns/data without using underscores.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage A potential issue that has not been confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants