flet
flet copied to clipboard
```Stack``` animation is not working when downsizing
Description
Stack animation is working on increasing size, but it's not working while decreasing size
Code example to reproduce the issue:
import flet as ft
def main(page: ft.Page):
page.vertical_alignment = ft.MainAxisAlignment.CENTER
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
def on_click(e):
if stack.height == 100:
stack.height = 200
else:
stack.height = 100
stack.update()
c = ft.Container(
bgcolor= ft.colors.RED,
height= 200, # container with height more than initial stack height to demonstrate the abnormality of stack
width= 100,
on_click= on_click
)
stack = ft.Stack(
controls= [
c
],
width= 100,
height= 100,
animate_size= 500
)
page.add(stack)
ft.app(main)
Describe the results you received:
Screencast from 2024-03-20 23-10-17.webm
Describe the results you expected:
To shrink in size with animation
Flet version (pip show flet):
Name: flet
Version: 0.21.2
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page:
Author: Appveyor Systems Inc.
Author-email: [email protected]
License: Apache-2.0
Location: /home/lekshman/bbb/bbb_env/lib/python3.12/site-packages
Requires: cookiecutter, fastapi, flet-runtime, packaging, qrcode, uvicorn, watchdog
Required-by:
Operating system:
Kali Linux - A Debian based OS