I don't know how to change it and what widgets are wrongly nested and why does flutter complaint about it. I understand that it is something related to widgets which are wrongly nested. Margin: const EdgeInsets.only(left: 40.0),ĬrossAxisAlignment: CrossAxisAlignment.start, MainAxisAlignment: MainAxisAlignment.start,ĬrossAxisAlignment: CrossAxisAlignment.center, Padding: const EdgeInsets.only(top: 25, left: 16, right: 16), My code sinppet is as follow body: Container( NotificationListener ← KeepAlive ← AutomaticKeepAlive ← ⋯ Padding ← Container ← Positioned ← Row ← Stack ← RepaintBoundary ← IndexedSemantics ← The ownership chain for the RenderObject that received the incompatible parent data was: The offending Positioned is currently placed inside a Row widget. Positioned widgets are placed directly inside Stack widgets. Usually, this means that the Positioned widget has the wrong ancestor RenderObjectWidget. StackParentData to a RenderObject, which has been set up to accept ParentData of incompatible type The ParentDataWidget Positioned(right: 0.0, bottom: 0.0) wants to apply ParentData of type The following assertion was thrown while applying parent data.: When I just pass the class inside the Stack by manually changing the Key, everything works as it should.I am new to flutter and I am getting an exception which I am not able to understand. (elided 11 frames from class _RawReceivePortImpl, class _Timer, #179 SchedulerBinding.scheduleWarmUpFrame. #177 SchedulerBinding._invokeFrameCallback #176 RendererBinding._handlePersistentFrameCallback #108 RenderCustomMultiChildLayoutBox.performLayout #107 MultiChildLayoutDelegate._callPerformLayout #105 MultiChildLayoutDelegate.layoutChild #98 RenderCustomMultiChildLayoutBox.performLayout #97 MultiChildLayoutDelegate._callPerformLayout #68 RenderViewportBase.layoutChildSequence #65 RenderSliverEdgeInsetsPadding.performLayout #62 RenderSliverMultiBoxAdaptor.addInitialChild #61 RenderSliverMultiBoxAdaptor._createOrObtainChild #59 PipelineOwner._enableMutationsToDirtySubtrees #57 RenderSliverMultiBoxAdaptor._createOrObtainChild. #56 SliverMultiBoxAdaptorElement.createChild #54 SliverMultiBoxAdaptorElement.createChild. #53 SliverMultiBoxAdaptorElement.updateChild #2 RenderObjectElement.attachRenderObject #0 RenderObjectElement._updateParentData. When the exception was thrown, this was the stack MyRandomizedButton- ← RepaintBoundary ← IndexedSemantics ←ĪutomaticKeepAlive ← KeyedSubtree->] ← SliverList ← ⋯ Incompatible parent data was: SizedBox ← Positioned ← The ownership chain for the RenderObject that received the The offending Positioned is currently placed Typically, Positioned widgets are placed directly Usually, this means that the Positioned widget has the wrong ancestor RenderObject, which has been set up to accept ParentData of Height: 366.0) wants to apply ParentData of type StackParentData to a The ParentDataWidget Positioned(left: 154.0, top: 21.0, width: 73.0, While applying parent data.: Incorrect use of ParentDataWidget. ════════ Exception caught by widgets library I am trying to pass a class inside the Stack to the ListView, but it does not display on the screen as it should and gives an error
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |