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

Incorrect use of ParentDataWidget #3

Closed
stoto34 opened this issue Sep 28, 2021 · 4 comments
Closed

Incorrect use of ParentDataWidget #3

stoto34 opened this issue Sep 28, 2021 · 4 comments

Comments

@stoto34
Copy link

stoto34 commented Sep 28, 2021

Hello !

I tested this library with my Epson TM printer but I have one error when I run it :

The following assertion was thrown while applying parent data.:
Incorrect use of ParentDataWidget.

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

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

The ownership chain for the RenderObject that received the incompatible parent data was:
  Column ← Expanded ← MediaQuery ← Padding ← SafeArea ← _BodyBuilder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ← AnimatedBuilder ← ⋯
When the exception was thrown, this was the stack

Any idea to solve this ? Thank you very much for this library 
@stoto34 stoto34 changed the title The ParentDataWidget Expanded + lib error Incorrect use of ParentDataWidget Sep 28, 2021
@mrtungdev
Copy link
Owner

Please check your widget :)

@stoto34
Copy link
Author

stoto34 commented Sep 28, 2021

@mrtungdev
Copy link
Owner

oh so sorry. What's your flutter version? did you run release mode?

I'll update the example when this package is stable. Thank you so much

@stoto34
Copy link
Author

stoto34 commented Sep 30, 2021

No worries. I'm using Flutter 2.5.1 and I run it in debug mode on an emulator device (API 27)
Thank you very much for your work, very usefull !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants