flet
flet copied to clipboard
page.window_visible not working correctly on MacOS
I'm trying to make a window that becomes invisible for 1 sec when I click a button and then turns visible again. The code is super simple and it works perfectly on a Windows PC. But on MacOS it somehow doesn't work. The window disappears and doesn't show up again.
import flet as ft
import time
def main(page: ft.Page):
def btn_click(e):
page.window_visible = False
page.update()
time.sleep(1)
page.window_visible = True
page.update()
page.add(
ft.ElevatedButton("Say hello!", on_click=btn_click),
)
ft.app(target=main)
Flet version: 0.8.2 MacOS 13.4.1