Skip to content

Commit

Permalink
add ´skip_route_change_event´ to ´page.go_async´ (#2092)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndonkoHenri authored Nov 16, 2023
1 parent ad2ad88 commit 5ad77c5
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions sdk/python/packages/flet-core/src/flet_core/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,18 +536,19 @@ def go(self, route, skip_route_change_event=False, **kwargs):
self.update()
self.query() # Update query url (required when using go)

async def go_async(self, route, **kwargs):
async def go_async(self, route, skip_route_change_event=False, **kwargs):
self.route = route if not kwargs else route + self.query.post(kwargs)

await self.__on_route_change.get_handler()(
ControlEvent(
target="page",
name="route_change",
data=self.route,
page=self,
control=self,
if not skip_route_change_event:
await self.__on_route_change.get_handler()(
ControlEvent(
target="page",
name="route_change",
data=self.route,
page=self,
control=self,
)
)
)
await self.update_async()
self.query()

Expand Down

0 comments on commit 5ad77c5

Please sign in to comment.