examples icon indicating copy to clipboard operation
examples copied to clipboard

Broken example temporary resolution proposal

Open non-npc opened this issue 5 months ago • 2 comments

@ndonkoHenri

Since 'FLET_APP_HIDDEN' does not function, I am unsure of how this example is supposed to function https://github.com/flet-dev/examples/blob/main/python/controls/page/window-hidden-on-start.py

I assume the intention is to have the app hidden for 3 ticks then displayed.

I propose a temporary fix to have a working example, this one uses the WEB_VIEW after 3 ticks the view changes:

`from time import sleep import flet from flet import Page, Text

def main(page: Page): page.window.visible = False

page.add(Text("Hello!"))

sleep(3)

page.window.visible = True
page.update()

flet.app(target=main, view=flet.AppView.WEB_BROWSER)`

Let me know if you approve and I will proceed with the update. Also, this fixes the deprecation warning about window visiblity.

non-npc avatar Sep 12 '24 17:09 non-npc