Skip to content

bug: animations do not work on flet-desktop #6762

Description

@begeansma019

Duplicate Check

Describe the bug

The animations don't work on flet desktop. When the animation is run it is not smooth its jittery.

Code sample

Code
import flet as ft


def main(page: ft.Page):
    def animate(e: ft.Event[ft.Button]):
        container.offset = ft.Offset(0, 0)
        container.update()

    page.add(
        ft.SafeArea(
            content=ft.Column(
                controls=[
                    container := ft.Container(
                        width=150,
                        height=150,
                        bgcolor=ft.Colors.BLUE,
                        border_radius=ft.BorderRadius.all(10),
                        offset=ft.Offset(x=-1.1, y=0),
                        animate_offset=ft.Animation(
                            duration=600,
                            curve=ft.AnimationCurve.BOUNCE_OUT,
                        ),
                    ),
                    ft.Button("Reveal!", on_click=animate),
                ],
            ),
        )
    )


if __name__ == "__main__":
    ft.run(main)

To reproduce

Run the program in a python ide in flet desktop view.

Expected behavior

The animation will not be smooth

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

Windows 11 Home, version 25H2, OS build 26200.8875

Flet version

flet==0.86.5

Regression

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

Suggestions

The animations work fine in flet web so it narrows it down to just flet desktop

Logs

Logs
[Paste your logs here]

Additional details

Screen recording makes the animation look smooth when its not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions