diff --git a/python/community/flet_animations/hover_animation.py b/python/community/flet_animations/hover_animation.py index 744e9d64..c9246133 100644 --- a/python/community/flet_animations/hover_animation.py +++ b/python/community/flet_animations/hover_animation.py @@ -12,8 +12,9 @@ def on_exit(): width=page.width; for i in range(100): time.sleep(0.001); - pb.value-=0.01; - page.update(); + if pb.value > 0: + pb.value -= 0.01 + page.update() page.horizontal_alignment = page.vertical_alignment = "center"; progress_bar=pb = ft.ProgressBar(width=185, value=0, color="amber", bgcolor="#eeeeee"); exp=ft.Column(alignment="center", controls=[ft.Row(alignment="center", controls=[ft.Column(controls=[ft.GestureDetector(