Skip to content

AI CLI export emits unresolved List<DataStruct<?>> for custom-struct App State / page-state list fields (standard export works correctly) #7292

Description

@Artistikcreations

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

Summary
App State list fields (and at least one page's local state fields) whose element type is a
custom Data Type are exported by the AI CLI's typed SDK generator with an unresolved generic
placeholder, List<DataStruct<?>>, instead of the concrete struct type (e.g. List<IntroModelStruct>).
The standard code export from the FlutterFlow editor produces the correct concrete types for the
exact same fields, confirming this is isolated to the AI export/codegen path.

Affected files

  • lib/flutterflow_project/app_state.dart
  • lib/flutterflow_project/pages/basic_info_page.dart

Affected fields

App State (14):

  • introList -> should be List
  • reminderList -> should be List
  • dayWiseChartList -> should be List
  • allDayTaskList -> should be List
  • bannerList -> should be List
  • categoriesList -> should be List
  • dietPlanAllList -> should be List
  • bolgAllList -> should be List
  • goalList -> should be List
  • preferredDietList -> should be List
  • recentDishesList -> should be List
  • dayWiseDietList -> should be List
  • messageList -> should be List
  • recommendedProductsList -> should be List

BasicInfoPage local state (2):

  • motivesList -> should be List
  • dietTypeList -> should be List

Expected Behavior

For an App State (or page-state) field whose element type is a custom Data Type, the AI CLI's
typed SDK generator should resolve the field's typeName to the concrete struct type, matching
what the standard code export from the FlutterFlow editor already produces for the same field.

Example: for App State field introList, typed as a List of the "Intro" custom Data Type, the
generated lib/flutterflow_project/app_state.dart should contain:

typeName: "List<IntroModelStruct>"

Instead, it currently contains:

typeName: "List<DataStruct<?>>"

This should hold for all 16 affected fields listed above, and should survive a fresh
flutterflow ai refresh-context (it currently does not — the placeholder persists even after
a clean regeneration, ruling out stale cache as the cause).

Steps to Reproduce

Reproduction

  1. Define a custom Data Type (e.g. "Intro") and an App State list field typed as a list of that struct.
  2. Run flutterflow ai refresh-context <project-id> (or any AI CLI export/push).
  3. Inspect the generated lib/flutterflow_project/app_state.dart: the field's ProjectAppStateFieldHandle
    has typeName: "List<DataStruct<?>>" instead of typeName: "List<IntroModelStruct>".
  4. Compare against a standard code export from the editor for the same field: it correctly emits
    the concrete struct type.

Reproducible from Blank

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

Bug Report Code (Required)

IT80jPLqw49PxcNY+Kr2b8BKpyQRQ2InbZ0wluxEdxAbCKKrP4lzf8nVN1NpXu24Sm9fGkf+hn0y3M7LvtieUewoHAeCGb5h/5VXdwrxeH2hVq6VDquaRWpQAcNUClya4cKNpyNBC/NzWlIg73GhfuzKdB7aQITVCkUZFv+KJobJjmyqHB3vNyEz+zMAHmreTI5ODEz25eKMrop5yfj/0w==

Visual documentation

im using Cladue code sonnet 5 as my code editor

Environment

**Project ID:** larissa-copy-whats-reallyinit-jy8cu4
**FlutterFlow AI CLI version:** 0.0.36
 FlutterFlow Desktop: Windows
OS Name: Microsoft Windows 11 Pro
Brave Browser: v1.92.138

Additional Information

Notes

  • Ran flutterflow ai refresh-context <project-id> to rule out stale cache -- placeholders persisted
    after a fresh regeneration, confirming this is a codegen bug rather than local staleness.
  • typeName is a metadata string only (not an actual Dart generic in compiled code), so this does not
    break compilation, but it does make the typed SDK's field-type documentation incorrect/unusable for
    these fields.
  • Workaround in use: standard code export from the editor, and a manual local patch of the typeName
    strings (which will be overwritten by the next AI CLI export/refresh).

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageA potential issue that has not been confirmed as a bug.

    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