MCPcopy Index your code
hub / github.com/flet-dev/flet / add_header

Function add_header

sdk/python/examples/community/mind_queue/main.py:513–534  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

511 open_dialog(dlg)
512
513 def add_header():
514 name_field = ft.TextField(label="Header name")
515
516 def on_add(ev):
517 name = name_field.value.strip()
518 if not name:
519 return
520 system_data[name] = []
521 save_data(data)
522 close_current_dialog()
523 show_system(system_name)
524
525 dlg = ft.AlertDialog(
526 modal=True,
527 title=ft.Text("Add header"),
528 content=name_field,
529 actions=[
530 ft.TextButton("Cancel", on_click=close_current_dialog),
531 ft.TextButton("Add", on_click=on_add),
532 ],
533 )
534 open_dialog(dlg)
535
536 # ---------- Draw headers + tasks ----------
537

Callers 1

show_systemFunction · 0.85

Calls 1

open_dialogFunction · 0.70

Tested by

no test coverage detected