You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the opened issues and there are no duplicates
Describe the bug
If the Container inside the BottomSheet is assigned the animate and bgcolor attributes, along with the on_animation_end handler, the handler will be called when the BottomSheet is opened.
The behavior changes if the bgcolor attribute is None.
Code sample
Code
importfletasftclassTestItem(ft.Container):
def__init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# issue with animate and bgcolorself.bgcolor=ft.Colors.PRIMARY_CONTAINERself.animate=ft.Animation(300, ft.AnimationCurve.EASE)
self.on_animation_end=self.test_issueself.content=ft.Text('Test')
deftest_issue(self, _):
print('if bgcolor is defined, then on_animation_end will be called')
sheet=ft.BottomSheet(
content=ft.Column(
controls=[TestItem() for_inrange(10)],
scroll=ft.ScrollMode.AUTO, width=400
)
)
defmain(page: ft.Page):
page.floating_action_button=ft.FloatingActionButton(
icon=ft.Icons.ADD, on_click=lambdae: e.page.open(sheet)
)
page.update()
ft.app(main)
To reproduce
Run the code
Click the floating button
See the print output in the terminal
Expected behavior
No response
Screenshots / Videos
Operating System
macOS
Operating system details
Sequoia 15.2
Flet version
0.26.0
Regression
Yes, it worked as expected in 0.25.2
Suggestions
No response
Logs
Additional details
No response
The text was updated successfully, but these errors were encountered:
Duplicate Check
Describe the bug
If the
Container
inside theBottomSheet
is assigned theanimate
andbgcolor
attributes, along with theon_animation_end
handler, the handler will be called when theBottomSheet
is opened.The behavior changes if the
bgcolor
attribute is None.Code sample
Code
To reproduce
Expected behavior
No response
Screenshots / Videos
Operating System
macOS
Operating system details
Sequoia 15.2
Flet version
0.26.0
Regression
Yes, it worked as expected in 0.25.2
Suggestions
No response
Logs
Additional details
No response
The text was updated successfully, but these errors were encountered: