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
FletNavigator - Simple and fast navigator (router) for Flet (Python) that allows you to create multi-page applications!<br>It allows you to define own routes, provides built-in URL parameters support, animations (in-future), virtual routing, and more...<br><br>
17
+
FletNavigator - Simple and fast navigator (router) for Flet (Python) that allows you to create multi-page applications!<br>It allows you to define own routes, provides built-in URL parameters support, animations, virtual routing, and more...<br><br>
16
18
17
19
Installation is quite easy: ```pip install flet_navigator```
-`navigate(route: str, page: Page, args: tuple[Any]=None) -> None` - Navigate to specific route. Specify `args` to transfer arguments to other page.
107
+
-`navigate_homepage(page: Page, args: tuple[Any]=None) -> None` - Navigate to homepage.
87
108
-`render(page: Page, args: tuple[Any]=None) -> None` - Render current route. If there is no route like that throw ROUTE-404 (if specified). Should be called only one time.
88
109
-`set_route_data(self, route: str, data: Any) -> int` - Set route data (cookies-like mechanism). Returns success/fail.
89
110
-`get_route_data(self, route: str) -> Any` - Get route data.
111
+
-`set_homepage(self, homepage: str) -> None` - Set homepage (main page).
90
112
91
113
Using example:
92
114
93
115
```python
94
116
from flet import app, Page
95
117
96
-
from flet_navigator import VirtualFletNavigator, PageData, Any, ROUTE_404
118
+
from flet_navigator import VirtualFletNavigator, PageData, ROUTE_404
-`render(page: Page, args: tuple[Any]=None, route_parameters: dict[str, Any]={}) -> None` - Render current route. If there is no route like that throw ROUTE-404 (if specified). Should be called only one time.
136
-
-`set_route_data(self, route: str, data: Any) -> int` - Set route data (cookies-like mechanism). Returns success/fail.
137
-
-`get_route_data(self, route: str) -> Any` - Get route data.
162
+
-`set_route_data(route: str, data: Any) -> int` - Set route data (cookies-like mechanism). Returns success/fail.
163
+
-`get_route_data(route: str) -> Any` - Get route data.
164
+
-`set_homepage(homepage: str) -> None` - Set homepage (main page).
138
165
139
166
Using example:
140
167
141
168
```python
142
169
from flet import app, Page, WEB_BROWSER
143
170
144
-
from flet_navigator import FletNavigator, Any,ROUTE_404
171
+
from flet_navigator import FletNavigator ROUTE_404
0 commit comments