Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

AttributeError: module 'flet' has no attribute 'icons' in official example code #208

@sajjadrahman56

Description

@sajjadrahman56

📝 Issue Description:

Hi Flet Team 👋,

While running one of the official example codes todo.py from Flet, I encountered the following error:

AttributeError: module 'flet' has no attribute 'icons'. Did you mean: 'Icons'?

🔍 Details:

  • Error Line in Code:
icon = ft.icons.ADD
  • Correct Version Should Be:
icon = ft.Icons.ADD

⚠️ Full Traceback:

  File "app.py", line 103, in __init__
    icon=ft.icons.ADD, on_click=self.add_clicked
         ^^^^^^^^
AttributeError: module 'flet' has no attribute 'icons'. Did you mean: 'Icons'?

🧪 Environment:

  • Python version: 3.10
  • Flet version: 0.28.3
  • OS: Windows 10
  • Running with: flet app.py

📌 Suggestion:

Please consider updating the typo from ft.icons.ADD to ft.Icons.ADD in the official example or documentation wherever applicable. This will prevent confusion for beginners trying out Flet for the first time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions