FlutterFlow Strips Leading Underscore from Supabase Field Names, Causing Naming Conflicts - "_" #5482
Open
1 of 2 tasks
Labels
status: needs triage
A potential issue that has not been confirmed as a bug.
Can we access your project?
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
Bug Report Code (Required)
ITEeiPGAzItPj71H+pPqaMFKrwMwJ0QlUIInj+0bWRMhfbnpO5kqec7SQBdLYtTjS3w3emaamkQHwtaJvvDhDsY5Hw6dfYBezq5XQQ3dcGC6VL6pPKiSSWhBM55hGW2O1p6vgiR/AM1vWUIR6k+IIfCrG3qCf9qOYwx5e6fDbOY=
Visual documentation
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
Additional Information
No response
The text was updated successfully, but these errors were encountered: