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
Abdur-Rahmaan Janhangeer
April 15, 2023
Education
550
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
95
Extending Flask using the Flask Plugins API
osdotsystem
0
170
PEPs that hit the front page
osdotsystem
0
170
The state of NLP in production 🥽
osdotsystem
0
210
libSQL: Taking Sqlite To The Moon
osdotsystem
0
260
Boosting Python With Rust 🚀
osdotsystem
0
250
SQLite Internals: How The World's Most Used Database Works
osdotsystem
2
3.8k
Fast Flask Dev For Big Codebases
osdotsystem
0
280
Python Bytecode or How Python Operates
osdotsystem
0
370
Other Decks in Education
See All in Education
プロポーザルを書く技術とアンチパターン/proposal-writing-and-antipatterns
moriyuya
13
3.5k
Human-AI Interaction - Lecture 11 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.1k
Examen de Selectividad. Geografía junio 2026 (Convocatoria Ordinaria). UCLM
juanmartin2026
1
1.5k
Modern Data Fetching Techniques in Angular
debug_mode
0
230
参加制約理論
roadofhope
0
130
Info Session MSc Computer Science & MSc Applied Informatics
signer
PRO
0
300
焦燥を平穏に変えるエンジニアのための哲学
ichimichi
7
5.4k
BITCOIN : Les fondamentaux !
rlifchitz
0
200
Portable & Reproducible Research Environments in the Age of AI Agents
denkiwakame
0
490
Dashboards - Lecture 11 - Information Visualisation (4019538FNR)
signer
PRO
1
2.8k
【デザイナー就活講座】 デザイナー就活市場・企業探し・ポートフォリオのポイント
koheihasebe
0
240
JAWS-UG初心者支部#81 GWにEduJAWSと何か作ろうもくもく会!
otsuki
0
150
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Git: the NoSQL Database
bkeepers
PRO
432
67k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Unsuck your backbone
ammeep
672
58k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
350
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
190
ラッコキーワード サービス紹介資料
rakko
1
3.9M
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