Skip to content

PopupMenuTheme is broken code base #5182

Open
@Aleksandr-Sopliakov

Description

@Aleksandr-Sopliakov

Duplicate Check

Describe the bug

Hey guys,
Please have a look at https://github.com/flet-dev/flet/blob/main/sdk/python/packages/flet/src/flet/core/theme.py#L800

if self.year_2023 is not None:

There is access to non existing property what leads to runtime errors. Looks like a joke.

Flet version is 0.27.6

Code sample

Code
popup_menu_theme=PopupMenuTheme()

AttributeError: 'PopupMenuTheme' object has no attribute 'thumb_size'

To reproduce

  1. Instantiate PopupMenuTheme object.

Expected behavior

No "AttributeError: 'PopupMenuTheme' object has no attribute 'thumb_size'"

Screenshots / Videos

Captures

[Upload media here]

Operating System

Linux

Operating system details

Ubuntu 22.04

Flet version

0.27.6

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

Remove the unknown fields from the code base and extend the testing in order to provide runtime stability.

Logs

Logs
[Paste your logs here]

Additional details

No response

Metadata

Metadata

Assignees

Labels

bug: regressionA feature that worked correctly doesn't anymore

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions