We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using flet 0.1.43.
With this code, I get a full screen red box, as expected:
import flet from flet import Container, Page, colors def main(page: Page): page.add(Container(expand=True, bgcolor=colors.RED)) page.update() flet.app(target=main)
If I add an on_click handler, the container breaks in mysterious ways:
on_click
import flet from flet import Container, Page, colors def was_clicked(event): print("Clicked") def main(page: Page): page.add(Container(expand=True, bgcolor=colors.RED, on_click=was_clicked)) page.update() flet.app(target=main)
If I give the container a fixed size, all is good and the callback works.
import flet from flet import Container, Page, colors def was_clicked(event): print("Clicked") def main(page: Page): page.add(Container(width=100, height=100, bgcolor=colors.RED, on_click=was_clicked)) page.update() flet.app(target=main)
The text was updated successfully, but these errors were encountered:
Fix #140: Container on_click callback breaks containers without expli…
7c349bd
…cit size
e2d71e6
Successfully merging a pull request may close this issue.
Using flet 0.1.43.
With this code, I get a full screen red box, as expected:
If I add an
on_click
handler, the container breaks in mysterious ways:If I give the container a fixed size, all is good and the callback works.
The text was updated successfully, but these errors were encountered: