flet
flet copied to clipboard
feature: declarative support update from service
Duplicate Check
- [x] I have searched the opened issues and there are no duplicates
Describe the requested feature
when we design a component, it may receive value update from a service. or in general case, https://docs.flet.dev/cookbook/declarative-vs-imperative-crud-app/#3-pageupdate-everywhere-nowhere when we replace page.update(), we can't replace
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
page.appbar = ft.AppBar(title=ft.Text("flet sherpa onnx"), center_title=True)
fso_service = fso.FletSherpaOnnx()
page._services.append(fso_service)
which causes page still a dependency of component and further cause error.
Suggest a solution
No response
Screenshots
No response
Additional details
No response
You mean adding service instance to a page, like:
ft.context.page.services.append(fso_service)
You mean adding service instance to a page, like:
ft.context.page.services.append(fso_service)
one step further, after the service ready. if there any event of data stream from fso_service? how to handle this case?