Skip to content

Commit e11caf7

Browse files
authored
Documentation.
Documentation.
1 parent 665d95b commit e11caf7

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

flet-navigator-docs.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1 align="center">FletNavigator v2.4.5 Documentation.</h1>
1+
<h1 align="center">FletNavigator v2.5.5 Documentation.</h1>
22

33
<h4 align="center">Menu:</h4>
44

@@ -38,7 +38,7 @@ Installation is quite easy: ```pip install flet_navigator```
3838
- **NO TODO...**
3939

4040
**FletNavigator Known Bugs**:
41-
- **No known bugs...**
41+
- **No flexible support for widgets like `AppBar` and others.**
4242

4343
<hr>
4444

@@ -103,7 +103,7 @@ Homepage is main page, that you can set with `set_homepage`, and navigate with `
103103
- `appbars: dict[int, Control] = {}` - Dictionary of appbars for each page (ID).
104104
- `route_changed_handler: RouteChangedHandler = None` - Route changed handler.<br><br>
105105

106-
- `__init__(routes: dict[str, Callable[[Page, 'VirtualFletNavigator', tuple[Any], str], None]], route_changed_handler: Callable[[str], None]=None, navigator_animation: NavigatorAnimation=NavigatorAnimation()) -> None` - Initialize Virtual Flet Navigator.
106+
- `__init__(routes: Routes={}, route_changed_handler: Callable[[str], None]=None, navigator_animation: NavigatorAnimation=NavigatorAnimation()) -> None` - Initialize Virtual Flet Navigator.
107107
- `navigate(route: str, page: Page, args: tuple[Any]=None) -> None` - Navigate to specific route. Specify `args` to transfer arguments to other page.
108108
- `navigate_homepage(page: Page, args: tuple[Any]=None) -> None` - Navigate to homepage.
109109
- `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.
@@ -157,9 +157,9 @@ app(target=main)
157157
- `appbars: dict[int, Control] = {}` - Dictionary of appbars for each page (ID).
158158
- `route_changed_handler: RouteChangedHandler = None` - Route changed handler.<br><br>
159159

160-
- `__init__(page: Page, routes: dict[str, Callable[[Page, 'VirtualFletNavigator', tuple[Any], str], None]], route_changed_handler: Callable[[str], None]=None, navigator_animation: NavigatorAnimation=NavigatorAnimation()) -> None` - Initialize Flet Navigator.
161-
- `navigate(route: str, page: Page, args: tuple[Any]=None) -> None` - Navigate to specific route. Specify `args` to transfer arguments to other page.
162-
- `navigate_homepage(page: Page, args: tuple[Any]=None) -> None` - Navigate to homepage (main page).
160+
- `__init__(page: Page, routes: Routes={}, route_changed_handler: Callable[[str], None]=None, navigator_animation: NavigatorAnimation=NavigatorAnimation()) -> None` - Initialize Flet Navigator.
161+
- `navigate(route: str, page: Page, args: tuple[Any]=None, parameters: dict=None) -> None` - Navigate to specific route. Specify `args` to transfer arguments to other page.
162+
- `navigate_homepage(page: Page, args: tuple[Any]=None, parameters: dict=None) -> None` - Navigate to homepage (main page).
163163
- `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.
164164
- `set_route_data(route: str, data: Any) -> int` - Set route data (cookies-like mechanism). Returns success/fail. More <a href="https://github.com/xzripper/flet_navigator/issues/4#issuecomment-1817908000">detailed</a>.
165165
- `get_route_data(route: str) -> Any` - Get route data. More <a href="https://github.com/xzripper/flet_navigator/issues/4#issuecomment-1817908000">detailed</a>.
@@ -211,6 +211,7 @@ app(target=main, view=WEB_BROWSER) # Non-Virtual Navigator recommended in web.
211211
- `page_id: int = None` - Page ID.<br><br>
212212

213213
- `set_appbar(appbar: Control) -> None` - Set appbar for current page. More <a href="https://github.com/xzripper/flet_navigator/issues/4#issuecomment-1817908000">detailed</a>.
214+
- `add(self, *controls: Control) -> None` - Append control(s) to page. Works as same as `Page.add`.
214215

215216
<hr>
216217

@@ -233,7 +234,8 @@ def main(page: Page) -> None:
233234
- `NONE: int = 0` - None animation.
234235
- `FADE: int = 1` - Fade animation.
235236
- `SCALE: int = 2` - Scale animation.
236-
- `ROTATE: int = 3` - Rotate animation.
237+
- `SHRINK: int = 3` - Shrink animation.
238+
- `ROTATE: int = 4` - Rotate animation.
237239
- `SMOOTHNESS_1: list[float] = [0.9, 0.0]` - Smoothness level 1.
238240
- `SMOOTHNESS_2: list[float] = [0.9, 0.8, 0.0]` - Smoothness level 2.
239241
- `SMOOTHNESS_3: list[float] = [0.9, 0.8, 0.7, 0.0]` - Smoothness level 3.
@@ -263,7 +265,7 @@ def main_page(pg: PageData) -> None:
263265
...
264266
265267
def main(page: Page) -> None:
266-
navigator = FletNavigator({}) # Routes = {'/': main_page} / Supported for VirtualFletNavigator.
268+
navigator = FletNavigator() # Routes = {'/': main_page} / Supported for VirtualFletNavigator.
267269
```
268270

269271
<hr>
@@ -345,4 +347,4 @@ Summary! Now you know difference between virtual and non-virtual navigator, how
345347

346348
<hr>
347349

348-
<p align="center"><b><i>FletNavigator V2.4.5</i></b></p>
350+
<p align="center"><b><i>FletNavigator V2.5.5</i></b></p>

0 commit comments

Comments
 (0)