Skip to main content

Navigator for Flet.

Project description

Simple and fast navigator (router) for Flet (Python) that allows you to create multi-page applications!

Click here for documentation.

Using Example:

from flet import app, Page

from flet_navigator import VirtualFletNavigator, PageData, Any, ROUTE_404

def main_page(pg: PageData) -> None:
   ... # Main page content.

def second_page(pg: PageData) -> None:
   ... # Second page content.

def route_404(pg: PageData) -> None:
   ... # 404 Page Content.

def main(page: Page) -> None:
   # Initialize navigator.
   flet_navigator = VirtualFletNavigator(
      {
            '/': main_page, # Main page route.
            'second_page': second_page, # Second page route.
            ROUTE_404: route_404 # 404 page route.
      }, lambda route: print(f'Route changed!: {route}') # Route change handler (optional).
   )

   flet_navigator.render(page) # Render current page.

app(target=main)
https://raw.githubusercontent.com/xzripper/flet_navigator/main/example.gif

See the difference between VirtualFletNavigator and FletNavigator, and more here (<- documentation).


FletNavigator V2.1.1.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flet_navigator-2.1.2.tar.gz (4.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page