Skip to content

feature: declarative support update from service #5739

@SamYuan1990

Description

@SamYuan1990

Duplicate Check

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestSuggestion/Request for additional feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions