Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

Update splash-test.py #165

Open
non-npc wants to merge 1 commit into flet-dev:main
base: main
Choose a base branch
Loading
from non-npc:patch-14
Open

Update splash-test.py #165

non-npc wants to merge 1 commit into flet-dev:main from non-npc:patch-14

Conversation

@non-npc
Copy link
Contributor

@non-npc non-npc commented Sep 12, 2024

The "splash" property has been deprecated in recent versions of Flet. This patch updates the code to address this issue.

The "splash" property has been deprecated in recent versions of Flet. This patch updates the code to address this issue.
Copy link
Contributor

Wouldn't it be nice to store the bar in a variable, then use page.overlay.remove(my_bar) to remove it?
What do you think?

non-npc reacted with thumbs up emoji

Copy link
Contributor Author

non-npc commented Sep 12, 2024
edited
Loading

store the bar in a variable, then use page.overlay.remove(my_bar) to remove it

absolutely, fantastic idea!

Here is the updated code, let me know if you approve and I will apply the changes.

`from time import sleep
import flet
from flet import ElevatedButton, ProgressBar

def main(page):
def button_click(e):
my_bar = ProgressBar()
page.overlay.append(my_bar)

 btn.disabled = True
 page.update()
 sleep(3)
 page.overlay.remove(my_bar)
 btn.disabled = False
 page.update()
btn = ElevatedButton("Do some lengthy task!", on_click=button_click)
page.add(btn)

flet.app(target=main)
`

ndonkoHenri reacted with thumbs up emoji

Copy link
Contributor

Looks good to me.

non-npc added a commit to non-npc/examples that referenced this pull request Sep 12, 2024
The "splash" property has been deprecated in recent versions of Flet. This patch updates the code to address this issue.
Additionally as per request (flet-dev#165 (comment)) the bar is now stored in a variable, and we use page.overlay.remove(my_bar) to remove it
OwenMcDonnell pushed a commit that referenced this pull request Feb 12, 2025
The "splash" property has been deprecated in recent versions of Flet. This patch updates the code to address this issue.
Additionally as per request (#165 (comment)) the bar is now stored in a variable, and we use page.overlay.remove(my_bar) to remove it
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /