MCPcopy
hub / github.com/flet-dev/flet / update

Method update

sdk/python/examples/tutorials/todo/async/main.py:150–162  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

148 await self.task_delete(task)
149
150 async def update(self):
151 status = self.filter.tabs[self.filter.selected_index].text
152 count = 0
153 for task in self.tasks.controls:
154 task.visible = (
155 status == "all"
156 or (status == "active" and not task.completed)
157 or (status == "completed" and task.completed)
158 )
159 if not task.completed:
160 count += 1
161 self.items_left.value = f"{count} active item(s) left"
162 await super().update()
163
164
165async def main(page: ft.Page):

Callers 15

buildMethod · 0.95
add_clickedMethod · 0.95
initMethod · 0.95
add_clickedMethod · 0.95
task_status_changeMethod · 0.95
task_deleteMethod · 0.95
tabs_changedMethod · 0.95
add_clickedMethod · 0.95
add_clickedMethod · 0.95
task_deleteMethod · 0.95
add_clickedMethod · 0.95
task_status_changeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected