Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flet: Flutter in Python
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Abdur-Rahmaan Janhangeer
April 15, 2023
Education
540
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Flet: Flutter in Python
Abdur-Rahmaan Janhangeer
April 15, 2023
More Decks by Abdur-Rahmaan Janhangeer
See All by Abdur-Rahmaan Janhangeer
Building AI Agents with Python: A Deep Dive
osdotsystem
0
89
Extending Flask using the Flask Plugins API
osdotsystem
0
160
PEPs that hit the front page
osdotsystem
0
160
The state of NLP in production 🥽
osdotsystem
0
200
libSQL: Taking Sqlite To The Moon
osdotsystem
0
260
Boosting Python With Rust 🚀
osdotsystem
0
240
SQLite Internals: How The World's Most Used Database Works
osdotsystem
2
3.8k
Fast Flask Dev For Big Codebases
osdotsystem
0
270
Python Bytecode or How Python Operates
osdotsystem
0
370
Other Decks in Education
See All in Education
Data Processing and Visualisation Frameworks - Lecture 6 - Information Visualisation (4019538FNR)
signer
PRO
1
3.1k
AIには考えられないことを考えられる人になるために
iqbocchi
1
160
Gitがない時代 インターネットがない時代の 開発話
sapi_kawahara
0
280
モブ社員がモブエンジニアを名乗って得られたこと_20260413
masakiokuda
4
520
Lectura 1 (PIT : Python Basico)
robintux
0
360
Protecting Patrons with Digital Vendors
dsalo
0
200
[2026前期火5] 論理学(京都大学文学部 前期 第6回)「かつとまたはの規則」
yatabe
0
280
2026年度春学期 統計学 第5回 分布をまとめるー記述統計量(平均・分散など) (2026. 5. 7)
akiraasano
PRO
0
140
解決策を教えても次期リーダーは育たない ─ 器の発達に伴走するために / Partnering with leaders in their vertical development
matsu0228
1
330
Case Studies and Future Research - Lecture 12 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
170
「機械学習と因果推論」入門 ③ 漸近効率な推定量と二重機械学習
masakat0
0
690
「機械学習と因果推論」入門① 因果効果とは
masakat0
0
1.9k
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
The Limits of Empathy - UXLibs8
cassininazir
1
360
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
230
A designer walks into a library…
pauljervisheath
211
24k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
New Earth Scene 8
popppiees
3
2.3k
Exploring anti-patterns in Rails
aemeredith
3
410
Transcript
Flet: Techniques & Tips
2
Python Mauritius UserGroup (pymug) More info: mscc.mu/python-mauritius-usergroup-pymug/ Why Where codes
github.com/pymug share events twitter.com/pymugdotcom ping professionals linkedin.com/company/pymug all info pymug.com tell friends by like facebook.com/pymug 3
Abdur-Rahmaan Janhangeer Help people get into OpenSource People hire me
to work on Python projects https://www.compileralchemy.com 4
ssslides 5
Flet: Techniques & Tips 6
Overview 7
Codebase 8
Publish 9
Notes 10
11
12
Techniques 13
Skeleton import flet as ft def main(page: ft.Page): page.title =
"Window title" b = ft.TextButton("text") page.add(b) ft.app(target=main) 14
Events def button_clicked(e): ... button = ft.TextButton("text", on_click=button_clicked, data=0) 15
Update widget textfield.value = 'a' page.update(textfield) # page.update() 16
Routing 17
import flet as ft def main(page: ft.Page): page.title = "Routes
Example" def route_change(route): page.views.clear() page.views.append( ft.View( "/", [ ft.AppBar(title=ft.Text("Flet app"), bgcolor=ft.colors.SURFACE_VARIANT), ft.ElevatedButton("Visit Store", on_click=lambda _: page.go("/store")), ], ) ) if page.route == "/store": page.views.append( ft.View( "/store", [ ft.AppBar(title=ft.Text("Store"), bgcolor=ft.colors.SURFACE_VARIANT), ft.ElevatedButton("Go Home", on_click=lambda _: page.go("/")), ], ) ) page.update() def view_pop(view): page.views.pop() top_view = page.views[-1] page.go(top_view.route) page.on_route_change = route_change page.on_view_pop = view_pop page.go(page.route) ft.app(target=main, view=ft.WEB_BROWSER) 18
import flet as ft class View: url = '/page' elements
= [ ft.ElevatedButton(text="Elevated button"), ft.ElevatedButton(text="Elevated button") ] @classmethod def do_something(cls): ... @classmethod def view(cls): return ft.View( cls.url, cls.elements, ) 19
def main(page: ft.Page): page.title = "Routes Example" def route_change(route): page.views.clear()
page.views.append( ft.View( "/", [ ft.AppBar(title=ft.Text("Flet app"), bgcolor=ft.colors.SURFACE_VARIANT), ft.ElevatedButton("Visit Store", on_click=lambda _: page.go("/store")), ], ) ) if page.route == View.url: page.views.append( view.elements ) page.update() def view_pop(view): page.views.pop() top_view = page.views[-1] page.go(top_view.route) page.on_route_change = route_change page.on_view_pop = view_pop page.go(page.route) 20
Dev experience 21
Icons ft.icons.PAUSE_CIRCLE_FILLED_ROUNDED 22
Color ft.color.RED_400 23
Next in this session 24
Code an app based on one of the previous sessions
code 25
26