Skip to content

[flutter-web] Allow developers to add id to html elements #95624

@fralways

Description

@fralways

Use case

I would like to be able to find some element via id which I assigned to a widget in a flutter web app.

It's very hard / impossible to use solutions like usetiful (https://www.usetiful.com/) because they need to hook to some html element via id. Currently we have no way of adding id's to the widgets, and at best it looks something like in the screenshot:

Screenshot 2021-12-21 at 11 57 40

Proposal

Use key property from widgets and add them to html element id, or provide another way of adding element ids.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterplatform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions