codegen emits invalid

Troubleshooting

Bug report: codegen emits invalid null type for List<Document> AppState field mutators

Project: Zac Ap (zac-app-8zby3d)

Affected field: AppState field favoritesList, declared type List<Document<userRecipes>>

Symptom: Exported lib/app_state.dart fails to compile — the four generated list-mutator methods use the literal word null as a parameter/return type instead of the record class:

void addToFavoritesList(null value) { ... }

void removeFromFavoritesList(null value) { ... }

void updateFavoritesListAtIndex(int index, null Function(null) updateFn) { ... }

void insertAtIndexInFavoritesList(int index, null value) { ... }

This blocked a "Deploy to App Store" cloud build.

Comparison: A page-state field on RecipeFavoritesPagesPage with the identical declared type generates correctly (UserRecipesRecord throughout) — pointing to the bug being specific to AppState-scoped List<Document<...>> fields.

Ask: Fix codegen so AppState-scoped List<Document<...>> fields resolve the correct record type, matching page-state behavior.

What have you tried so far?

Retried flutterflow ai codegen refresh multiple times across two sessions (spanning ~2 days) — consistently returns a 500 "Unexpected error from the server" with no other diagnosable detail. Local environment health confirmed clean (CLI doctor, API key, project status all pass). Isolated the specific defect by comparing two AppState fields with identical declared types (List<Document<userRecipes>>): a page-scoped state field generates correctly with the proper record type, while the AppState-scoped field generates literal null as the type in four auto-generated mutator methods, which fails to compile. Manually patched the exported lib/app_state.dart locally as a stopgap (documented as fragile since it'll be overwritten by the next successful codegen refresh) to unblock local Android testing, but this doesn't reach FlutterFlow's cloud build, so App Store deployment remains blocked.

Yes i Checked documentation— checked FlutterFlow's own docs and this project's settings for any AppState/codegen configuration options related to List<Document> field types or known type-resolution issues. Found no documented setting, known-issue notice, or workaround for this specific behavior. This appears to be an undocumented codegen defect rather than a misconfiguration on our end.

Did you check FlutterFlow's Documentation for this topic?
Yes
2
1 reply