Skip to content

Markers with set keys will cause duplicate keys when visible across multiple worlds #2229

Description

@JaffaKetchup

What is the bug?

When a Marker has a key set, we use it internally on the Positioned widget. When we build multiple of them to cover across worlds, we duplicate the key, which is forbidden, causing an error.

How can we reproduce it?

Use the example app, add a key to any marker, zoom out until it should be visible multiple times.

Do you have a potential solution?

We should determine whether it is necessary to have the key passthrough here (for example, if the child is stateful). If it is, we should incorporate the world-shift value. The automated test will also need fixing (although from early experiments this was more difficult than it needed to be).

Ideally, we shouldn't build the same child more than once across the world - the ideal situation would be that it only gets built once, and painted multiple times. This is impossible without a custom render object: see #2134.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    Medium

    Effort

    Low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions