This repository was archived by the owner on Dec 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
Update splash-test.py #165
Open
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The "splash" property has been deprecated in recent versions of Flet. This patch updates the code to address this issue.
Contributor
ndonkoHenri
commented
Sep 12, 2024
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?
Contributor
Author
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)
`
Contributor
ndonkoHenri
commented
Sep 12, 2024
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
Merged
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The "splash" property has been deprecated in recent versions of Flet. This patch updates the code to address this issue.