Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

floating_action_button_theme missing from Theme #3770

Closed
1 task done
m00sey opened this issue Aug 6, 2024 · 1 comment · Fixed by #3771
Closed
1 task done

floating_action_button_theme missing from Theme #3770

m00sey opened this issue Aug 6, 2024 · 1 comment · Fixed by #3771

Comments

@m00sey
Copy link
Contributor

m00sey commented Aug 6, 2024

Duplicate Check

Describe the bug

When trying to implement a FloatingActionButtonTheme and add to the ft.Theme class there is no property to override.

Code sample

Code
class MyFloatingActionButtonTheme(ft.FloatingActionButtonTheme):
    def __init__(self):
        super().__init__(
            bgcolor='#FFFFFF',
        )


class MyTheme(ft.Theme):
    def __init__(self):
        super().__init__(
            floating_action_button_theme=MyFloatingActionButtonTheme(),
        )

To reproduce

Try to initialize the above theme.

page.theme = mypackage.MyTheme()

TypeError: Theme.__init__() got an unexpected keyword argument 'floating_action_button_theme'

Expected behavior

FAB theme should be overridden.

Screenshots / Videos

Captures

[Upload media here]

Operating System

macOS

Operating system details

MacOS 14.5

Flet version

0.22.0

Regression

No, it isn't

Suggestions

Logs

Logs
[Paste your logs here]

Additional details

No response

@m00sey
Copy link
Contributor Author

m00sey commented Aug 6, 2024

Workaround for me is to assign it to theme directly:

page.theme.floating_action_button_theme = MyFloatingActionButtonTheme()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants