-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm confused, after page. update(), page==None? #2603
Comments
For a class, the constructor function should be |
|
import flet as ft
def main(page: ft.Page):
page.views.clear()
page.views.append(ft.View("/", padding=ft.padding.all(0)))
print("page.views - before update", page.views)
page.update()
print(f"page.views - after update: {page.views}")
ft.app(main) gives
This code is working properly, I can't reproduce the error. |
thank you! I don't know where the problem lies |
Can you create a repo with minimal repro code? Try doing |
https://github.com/EmmetZ/ncm-downloader |
In your code, change every |
What is the difference? self.page and self.page_ I see many official examples using self. page |
Where?? Can you please provide me a link? |
I think this is what some controls do set their |
maybe, self.page reset the original |
maybe |
The problem is not with the self.page , i read link then resolve it. thank you very much! |
No problem. Now, close the issue |
`
def init(self):
self.page.views.clear()
self.page.views.append(
View(
"/",
[self.appbar, self.layout],
padding=padding.all(0)
)
)
print('self.page.views', self.page.views)
self.page.update()
print(self.page.views)
`
The text was updated successfully, but these errors were encountered: