TextField inside of Row causes layout exception: Unable to calculate size

后端 未结 8 1650
后悔当初
后悔当初 2020-11-28 04:08

I’m getting a rendering exception that I don’t understand how to fix. I’m attempting to create a column that has 3 rows.

Row [Image]

Row [TextField ]

<
8条回答
  •  悲&欢浪女
    2020-11-28 05:04

    you should use Flexible to use a Textfield inside a row.

    new Row(
                  children: [
                    new Text("hi there"),
                    new Container(
                      child:new Flexible(
                            child: new TextField( ),
                                ),//flexible
                    ),//container
    
    
                  ],//widget
                ),//row
    

提交回复
热议问题