BoxConstraints заставляет бесконечную ширину - PullRequest
0 голосов
/ 21 сентября 2018

Я получаю сообщение об ошибке при добавлении строки в столбец.Я получаю следующую ошибку:

I/flutter ( 6449): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 6449): The following assertion was thrown during performLayout():
I/flutter ( 6449): BoxConstraints forces an infinite width.
I/flutter ( 6449): These invalid constraints were provided to RenderAnimatedOpacity's layout() function 

Также для справки вот мой код:

return new Scaffold(
      backgroundColor: whiteColor,
      body: new Column(
        children: <Widget>[
          imgHeader,
          lblSignUp,
          txtEmail,
          Row(
            mainAxisAlignment: MainAxisAlignment.start,
            children: <Widget>[
              txtFirstName,
              txtLastName
            ],
          ),
        ],
      ),
    );

1 Ответ

0 голосов
/ 21 сентября 2018

Если вы используете TextField Внутри Row, вам нужно использовать Flexible или Expanded.

Более подробная информация приведена здесь в этом ответе.

https://stackoverflow.com/a/45990477/4652688

...