column中包 row 中有TextField报错
An InputDecorator, which is typically created by a TextField, cannot have an unbounded width.
This happens when the parent widget does not provide a finite width constraint. For example, if the InputDecorator is contained by a Row, then its width must be constrained. An Expanded widget or a SizedBox can be used to constrain the width of the InputDecorator or the TextField that contains it.
'package:flutter/src/material/input_decorator.dart':
Failed assertion: line 950 pos 7: 'layoutConstraints.maxWidth < double.infinity'
报错信息.png
字面意思就是需要添加约束,要加 constraints
Pasted Graphic 1.png这样就好了
网友评论