Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove error in console for example app #1762

Merged

Conversation

josxha
Copy link
Contributor

@josxha josxha commented Dec 6, 2023

The PluginScaleBar page of the example app has the following exception in the console:

======== Exception caught by widgets library =======================================================
The following assertion was thrown while applying parent data.:
Incorrect use of ParentDataWidget.

The ParentDataWidget Flexible(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject, which has been set up to accept ParentData of incompatible type MultiChildLayoutParentData.

Usually, this means that the Flexible widget has the wrong ancestor RenderObjectWidget. Typically, Flexible widgets are placed directly inside Flex widgets.
The offending Flexible is currently placed inside a CustomMultiChildLayout widget.

The ownership chain for the RenderObject that received the incompatible parent data was:
  LayoutBuilder ← FlutterMap ← Flexible ← KeyedSubtree-[GlobalKey#1f663] ← _BodyBuilder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ← _ActionsScope ← Actions ← ⋯

This happens because FlutterMap is wrapped in a Flexible parent widget that is not needed.
By removing the wrapping Flexible the error gets removed.

@josxha josxha added this to the v7.0 milestone Dec 6, 2023
@josxha josxha self-assigned this Dec 6, 2023
@JaffaKetchup JaffaKetchup merged commit 2642cd2 into fleaflet:master Dec 6, 2023
6 checks passed
@josxha josxha deleted the error-in-console-for-example-app branch December 6, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants