Skip to content

[BUG] MapOptions.applyPointerTranslucencyToLayers causes Positioned wrappers to fail #1740

@Zverik

Description

@Zverik

What is the bug?

I have been using Positioned extensively to place buttons around the map. This was validated by some of the examples. But those widgets are required to be placed in a Stack with no RenderObjects inbetween.

In 6.0.0 widgets, instead of being put in a Stack, are all wrapped in TranslucentPointer objects. Which leads to positioning not working, and multiple error notices in a log.

Can this thing you wanted to do be done differently? Or, are there alternatives to positioning widgets inside the map?

I thought of putting those on top of the map instead, but in that case those widgets (e.g. zoom buttons) won't have access to map state.

How can we reproduce it?

Use the Positioned widget as a top-level one for a map layer.

Do you have a potential solution?

Make applyPointerTranslucencyToLayers flag not wrap widgets, instead of setting a property of TranslucentPointer?

Alternatively, a way to properly upgrade such plugins needs to be documented. Align widget doesn't work for bottom-aligned buttons, for example.

Platforms

Android 12

Severity

Erroneous: Prevents normal functioning and causes errors in the console

Metadata

Metadata

Assignees

Labels

P: 1 (important)bugThis issue reports broken functionality or another error

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions