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

Exception Occurred while building the application #8

Open
nirajbais1 opened this issue Jun 20, 2020 · 1 comment
Open

Exception Occurred while building the application #8

nirajbais1 opened this issue Jun 20, 2020 · 1 comment

Comments

@nirajbais1
Copy link

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while looking for parent data.:
Incorrect use of ParentDataWidget.

The following ParentDataWidgets are providing parent data to the same RenderObject:

  • Expanded(flex: 1) (typically placed directly inside a Flex widget)
  • Expanded(flex: 1) (typically placed directly inside a Flex widget)
    However, a RenderObject can only receive parent data from at most one ParentDataWidget.

Usually, this indicates that at least one of the offending ParentDataWidgets listed above is not placed directly inside a compatible ancestor widget.

The ownership chain for the RenderObject that received the parent data was:
Row ← Expanded ← Expanded ← Column ← _BodyBuilder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ← AnimatedBuilder ← DefaultTextStyle ← ⋯
When the exception was thrown, this was the stack:
#0 RenderObjectElement._findAncestorParentDataElement. (package:flutter/src/widgets/framework.dart:5341:11)
#1 RenderObjectElement._findAncestorParentDataElement (package:flutter/src/widgets/framework.dart:5355:6)
#2 RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:5680:61)
#3 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5376:5)
#4 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5943:11)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
Reloaded 0 of 502 libraries in 601ms.

════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following assertion was thrown during performLayout():
Each child must be laid out exactly once.

@AmshenShanu07
Copy link

AmshenShanu07 commented Aug 19, 2021

Try flutter clean and do flutter pub get

If you show your code that will be super easy to help you

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