まだどこにもないアプリを作る

アプリ開発でつまづいたところなどを中心に記事にして行きます。

flutter エラーThe following assertion was thrown while applying parent data.: Incorrect use of ParentDataWidget. Expanded

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 ParentData.

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 _SingleChildViewport widget.

The ownership chain for the RenderObject that received the incompatible parent data was:
  Align ← Expanded ← _SingleChildViewport ← IgnorePointer-[GlobalKey#56b3f] ← Semantics ← Listener ← _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey

 

 

などのエラーが出た

 

ExpandedウィジェットをSingleChildScrollViewの中に入れているのをやめたら治った

 

ExpandedはSingleChildScrollViewのwidgetの中に入れられないのかもしれない

 

 

参考程度に報告します。