londonappbrewery / BMI-Calculator-Flutter-Completed

The completed code for the BMI Project - The Complete Flutter Development Bootcamp
https://www.appbrewery.co/
104 stars 147 forks source link

Exception Occurred while building the application #8

Open nirajbais1 opened 4 years ago

nirajbais1 commented 4 years ago

════════ 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:

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 commented 3 years ago

Try flutter clean and do flutter pub get

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