Skip to content

Component references theme colors "on_primary", "on_secondary", "on_error" that do not exist — cannot be created (underscore stripped) or edited #7239

Description

@PlataformaCrr

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

A button component named "Button3" (containing two Icon widgets) references the theme colors on_primary, on_secondary and on_error, which do not exist in my theme. This produces ~12 "Widget references theme color ... that does not exist" errors and a "Build Failed", blocking test/run.

I cannot fix it:

  • Creating or renaming a custom color strips the underscore (on_primary becomes onprimary), so names never match.
  • Setting the Icon Color to a valid color does not remove the broken reference (errors persist after a full reload).
  • Clearing or deleting the icons reverts with "would cause a breaking crash".
  • The Icon widget can't be replaced ("Only Text, TextField, Image... can be replaced").
  • The component can't be deleted because it's in use.

Please clear/remap these invalid color references on your side.

Expected Behavior

The component should reference valid theme colors (or allow me to remap them), so the project builds without these phantom color errors.

Steps to Reproduce

  1. Open the component "Button3" (it has two Icon widgets driven by Icon parameters "icon" and "iconEnd").
  2. Open the Errors panel (or press Cmd+R).
  3. Observe ~12 errors: "Widget references theme color on_primary / on_secondary / on_error that does not exist", pointing to the two Icon widgets.
  4. Try to fix: set Icon Color to a valid color (does not clear the error), clear/delete the icon (reverts with "would cause a breaking crash"), replace the icon (not allowed), create a color named on_primary (underscore is stripped to onprimary). None work.

Reproducible from Blank

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

Bug Report Code (Required)

IT4wi8rhuJV1rsdD+KXyb/kwmikWCDsmaJEridUbaCs8JJToPLAUZ8zBM05vZryiTVFIPmD8pz8d/PfqjYX9VPkqGyiWGoR8+pBuQw3dcEGuR5SsEpCzfW1THfJbFWak0qSrqxBBOu1YdGRi1Fz7Guu/EyrZJ7X6NTMROPyLKdeK2SrDX1iXc2URm05KZDPz

Visual documentation

Image Image

Environment

- FlutterFlow version: latest (web editor, June 2026)
- Platform: Web
- Browser name and version: Chrome (latest)
- Operating system and version affected: macOS

Additional Information

This blocks me from running/testing my app. The component was AI-generated and uses Material color-scheme names (on_primary/on_secondary/on_error) that my project's theme doesn't have and that I cannot create due to the underscore being stripped.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    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