You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ft.app(target=main, assets_dir="assets")
`
in my page.route == "/":
i have an api call which i make to populate data in it which is
in my Dashboard class this is what i have
in which the getAds() is where i am making the request. but the problem now is, the page doesn't load till the request comes in, but i want it in a async form in which the page loads but then waits for the request to come in just like how linkedin works incase a page failes to load you still have access to others.
please would be happy to get help
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Hello i have this code which runs perfectly without async which is this
`def main(page: ft.Page):
page.views.clear()
page.window_width = 450 # window's width is 200 px
page.window_height = 800
page.margin = 0
page.padding = 0
page.spacing = 0
theme = ft.Theme()
theme.page_transitions.linux = ft.PageTransitionTheme.CUPERTINO
theme.page_transitions.android = ft.PageTransitionTheme.CUPERTINO
page.theme = theme
ft.app(target=main, assets_dir="assets")
`
in my page.route == "/":
i have an api call which i make to populate data in it which is
in my Dashboard class this is what i have
`class Dashboard(ft.Container):
def init(self, page: ft.Page):
super().init()
in which the getAds() is where i am making the request. but the problem now is, the page doesn't load till the request comes in, but i want it in a async form in which the page loads but then waits for the request to come in just like how linkedin works incase a page failes to load you still have access to others.
please would be happy to get help
Code sample
No response
Error message
No response
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions