-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
39 lines (30 loc) · 1.01 KB
/
main.py
File metadata and controls
39 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
__author__ = "Omar Belfeki"
__copyright__ = "Copyright 2024-09-18, The Management App using python(flet)"
import flet as ft
from views.login import Login
from views.splash import Splash
from views.verification import Verification
from views.register import Register
def main(page: ft.Page) -> None:
page.window.height = 637
page.window.width = 290
# page.window.top = 1
# page.window.left = 1000
page.window.always_on_top = True
def router(route: str) -> None:
page.views.clear()
match page.route:
case "/":
page.views.append(Splash())
case "/login":
page.views.append(Login())
case "/verif":
page.views.append(Verification())
case "/reg":
page.views.append(Register())
page.update()
page.on_route_change = router
page.go("/")
page.update()
if __name__ == "__main__":
ft.app(target=main, assets_dir="assets")